Skip to content

Instantly share code, notes, and snippets.

Luke Hinds lukehinds

  • Red Hat, Inc
  • UK
Block or report user

Report or block lukehinds

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View crypto.py
'''
DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited.
This material is based upon work supported by the Assistant Secretary of Defense for
Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or
FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this
material are those of the author(s) and do not necessarily reflect the views of the
Assistant Secretary of Defense for Research and Engineering.
Copyright 2015 Massachusetts Institute of Technology.
View ca_util.py
#!/usr/bin/env python
'''
DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited.
This material is based upon work supported by the Assistant Secretary of Defense for
Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or
FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this
material are those of the author(s) and do not necessarily reflect the views of the
Assistant Secretary of Defense for Research and Engineering.
View ca_util.py
#!/usr/bin/env python
'''
DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited.
This material is based upon work supported by the Assistant Secretary of Defense for
Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or
FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this
material are those of the author(s) and do not necessarily reflect the views of the
Assistant Secretary of Defense for Research and Engineering.
View vtpm-setup.sh
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo -e "Please run as the root user"
exit 1
fi
read -p "Name for vtpm vm: " vm_name
echo -e "Turn off SELinux for now"
View ima-setup.sh
#!/bin/bash
# ./ima-setup.sh 2>&1 | tee output.log
WORK_DIR=$(pwd)
KEYLIME_HOME="${WORK_DIR}/python-keylime"
SWTPM_HOME="${WORK_DIR}/swtpm"
TPM2_TSS_HOME="${WORK_DIR}/tpm2-tss"
TPM2_TOOLS_HOME="${WORK_DIR}/tpm2-tools"
View keytest.sh
#!/bin/bash
REPO="/home/luke/repos/python-keylime"
tpm12image="lukehinds/keylime-ci-tpm12"
tpm12tag="v300"
tpm20image="lukehinds/keylime-ci-tpm20"
tpm20tag="v301"
echo -e "Grabbing latest images"
View vtpm.sh
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo -e "Please run as the root user"
exit 1
fi
echo -e "Updating Packages"
dnf update -y
View rust-cheatsheet.md

Cargo

cargo new hello_cargo # create new project
cargo run # compile and run
cargo build # build
cargo build --release # compiled with optimizations 
cargo fmt --all -- --check # check formatting (but don't correct)
cargo fmt --all # correct formatting.

$ git clone someurl.com/someproject
View tpm2_commands.md

Check ownership status

tpm2_getcap -c properties-variable

Query failure code

tpm2_rc_decode <code>

For example:

You can’t perform that action at this time.