update solo hacker key

This commit is contained in:
Conor Patrick 2018-12-10 21:21:56 -05:00
parent db0642eeab
commit 2a8498210c
3 changed files with 7 additions and 7 deletions

View File

@ -16,16 +16,15 @@ def flash_addr(num):
args = sys.argv[:]
# generic / hacker attestation key
secret_attestation_key = "cd67aa310d091ed16e7e9892aa070e1994fcd714ae7c408fb946b72e5fe75d30"
secret_attestation_key = "1b2626ecc8f69b0f69e34fb236d76466ba12ac16c3ab5750ba064e8b90e02448"
# user supplied, optional
for i,x in enumerate(args):
if x == '-s':
secret_attestation_key = args[i+1]
args = args[:i] + args[i+2:]
break
if secret_attestation_key is not None:
args = args[:i] + args[i+2:]
# TODO put definitions somewhere else
PAGES = 128
@ -35,6 +34,7 @@ ATTEST_ADDR = (flash_addr(PAGES - 15))
first = IntelHex(args[1])
for i in range(2, len(args)-1):
print('merging %s with ' % (args[1]), args[i])
first.merge(IntelHex( args[i] ), overlap = 'replace')
first[AUTH_WORD_ADDR] = 0
@ -49,9 +49,9 @@ first[AUTH_WORD_ADDR+7] = 0xff
if secret_attestation_key is not None:
key = unhexlify(secret_attestation_key)
print('using key ',key)
for i,x in enumerate(key):
print(hex(ATTEST_ADDR + i))
first[ATTEST_ADDR + i] = x
first.tofile(args[len(args)-1], format='hex')

View File

@ -11,7 +11,7 @@ curve=prime256v1
openssl ecparam -genkey -name "$curve" -out "$keyname" -rand seed.txt
# generate a "signing request"
openssl req -new -key "$keyname" -out "$keyname".csr -subj "/C=US/ST=Maryland/O=Solo Keys/OU=Authenticator Attestation/CN=solokeys.com/emailAddress=hello@solokeys.com"
openssl req -new -key "$keyname" -out "$keyname".csr -subj "/C=US/ST=Maryland/O=SOLO HACKER/OU=Authenticator Attestation/CN=solokeys.com/emailAddress=hello@solokeys.com"
# sign the request
openssl x509 -req -days 18250 -in "$keyname".csr -extfile v3.ext -CA "$2" -CAkey "$1" -set_serial 01 -out "$certname" -sha256

View File

@ -8,7 +8,7 @@ curve=prime256v1
# generate EC private key
openssl ecparam -genkey -name "$curve" -out "$keyname" -rand seed.txt
# generate a "signing request"
openssl req -new -key "$keyname" -out "$keyname".csr -subj "/C=US/ST=Maryland/O=Solo Keys/OU=Root CA/CN=solokeys.com/emailAddress=hello@solokeys.com"
openssl req -new -key "$keyname" -out "$keyname".csr -subj "/C=US/ST=Maryland/O=SOLO HACKER/OU=Root CA/CN=solokeys.com/emailAddress=hello@solokeys.com"
# self sign the request
openssl x509 -trustout -req -days 18250 -in "$keyname".csr -signkey "$keyname" -out "$certname" -sha256