This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <tss2/tss2_esys.h> | |
#include <tss2/tss2_rc.h> | |
#define DATA "hello world" | |
int main(int argc, char *argv[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <tss2/tss2_esys.h> | |
static ESYS_CONTEXT *ectx; | |
static ESYS_TR objectHandle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <tss2/tss2_esys.h> | |
void create_primary(ESYS_CONTEXT *ectx, ESYS_TR *parent) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yaml | |
y=yaml.load(open("props.yaml")) | |
for x in y: | |
print("{.property=%s, .value=0x%X}," % (x, y[x]['raw'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logging --level=info | |
# Keyboard layouts | |
keyboard 'us' | |
# Root password | |
rootpw --plaintext password | |
# user is needed for fedora? --disabled isn't an option | |
user --name="test" --password="password" | |
hostname fedoratest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wcrobert@wcrobert-MOBL1:~/workspace/tpm2-tools/tools$ find -name \*\.c | grep nv | xargs grep -lv on_arg_nv_index | wc -l | |
21 | |
wcrobert@wcrobert-MOBL1:~/workspace/tpm2-tools/tools$ find -name \*\.c | grep nv | wc -l | |
21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# SPDX-License-Identifier: BSD-2-Clause | |
''' | |
EXAMPLE CODE NOT INTENDED FOR PRODUCTION USE | |
Some Python code using ctypes to: | |
- enumerate the slot list | |
- find an empty slot | |
- Initialize a token | |
- Set the user pin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mssim_command() { | |
local raw="no" | |
local port="2322" | |
local ip="127.0.0.1" | |
while getopts "a:p:rh" opt; do | |
case ${opt} in | |
h) | |
echo "Send a command to the simulator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Source this file to get commands for launching containers like the tpm2-software CI system | |
# Example Usage: | |
# git clone https://github.com/tpm2-software/tpm2-tss.git | |
# cd tpm2-tss | |
# docker_run ubuntu-20.04 | |
# Uses whatever arg1 is passed to it as container name. Useful for passing hashes from docker build results. | |
_docker_run() { | |
local b=$(basename $(pwd)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On a docker ubuntu:16.04 base image, to build tpm2-abrmd I perform the following commands | |
sudo apt-get update | |
# The dependency list is fat here, because its deps for all the various projects, I trimmed it a little bit. | |
# but know you're getting more than you need. | |
sudo apt-get install -y \ | |
autoconf-archive \ | |
curl \ | |
libcmocka0 \ | |
libcmocka-dev \ |
OlderNewer