diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2023-06-28 15:06:24 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2023-06-28 16:05:44 -0400 |
commit | 504ef29ddb545487d77934fb4f93ab4ab24e1347 (patch) | |
tree | ba2ceaf3edb4f6179e48d60974dc7ace7640eee0 | |
parent | 5e84535fcf9905776145769d97bc56dd948ed7ae (diff) | |
download | openssl_tpm2_engine-504ef29ddb545487d77934fb4f93ab4ab24e1347.tar.gz |
doc: convert to sourcecode tag and add ASN.1 module
David Woodhouse suggested converting from <artwork> to <sourcecode>
for the ASN.1 code and Russ Housley suggested adding an ASN.1 module.
The ASN.1 module now passes the syntax checker at
https://osystest.site/webtools2/asn1SyntaxCheck.php
Which necessitated quite a few changes like the addition of commas and
the changing of value names to start with lower case
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | doc/draft-bottomley-tpm2-keys.xml | 101 |
1 files changed, 75 insertions, 26 deletions
diff --git a/doc/draft-bottomley-tpm2-keys.xml b/doc/draft-bottomley-tpm2-keys.xml index abdfa57..4a348f3 100644 --- a/doc/draft-bottomley-tpm2-keys.xml +++ b/doc/draft-bottomley-tpm2-keys.xml @@ -101,18 +101,18 @@ An alternate method (rfc include) is described in the references. specifications, which is why the TPMkey is not versioned. </t> <section anchor="tpmkey" title="TPMkey Syntax"> - <figure><artwork> + <sourcecode type="asn.1"> TPMKey ::= SEQUENCE { - type OBJECT IDENTIFIER - emptyAuth [0] EXPLICIT BOOLEAN OPTIONAL - policy [1] EXPLICIT SEQUENCE OF TPMPolicy OPTIONAL - secret [2] EXPLICIT OCTET STRING OPTIONAL - authPolicy [3] EXPLICIT SEQUENCE OF TPMAuthPolicy OPTIONAL - parent INTEGER - pubkey OCTET STRING + type OBJECT IDENTIFIER, + emptyAuth [0] EXPLICIT BOOLEAN OPTIONAL, + policy [1] EXPLICIT SEQUENCE OF TPMPolicy OPTIONAL, + secret [2] EXPLICIT OCTET STRING OPTIONAL, + authPolicy [3] EXPLICIT SEQUENCE OF TPMAuthPolicy OPTIONAL, + parent INTEGER, + pubkey OCTET STRING, privkey OCTET STRING } - </artwork></figure> + </sourcecode> <t> The fields of type TPMKey have the following meanings: </t> @@ -127,25 +127,25 @@ An alternate method (rfc include) is described in the references. extracted with TPM2_Unseal). The TCG has reserved the following OID prefix for this: </t> - <figure><artwork> + <sourcecode type="asn.1"> id-tpmkey OBJECT IDENTIFIER ::= {joint-iso-itu-t(2) international-organizations(23) 133 10 1} - </artwork></figure> + </sourcecode> <t> And the three key types are: </t> - <figure><artwork> + <sourcecode type="asn.1"> id-loadablekey OBJECT IDENTIFIER ::= {id-tpmkey 3} - </artwork></figure> - <figure><artwork> + </sourcecode> + <sourcecode type="asn.1"> id-importablekey OBJECT IDENTIFIER ::= {id-tpmkey 4} - </artwork></figure> - <figure><artwork> + </sourcecode> + <sourcecode type="asn.1"> id-sealedkey OBJECT IDENTIFIER ::= {id-tpmkey 5} - </artwork></figure> + </sourcecode> </section> <section title="emptyAuth"> <t> @@ -257,12 +257,12 @@ An alternate method (rfc include) is described in the references. supported by this standard (such as TPM2_PolicyAuthorize). </t> <section anchor="TPMPolicy" title="TPMPolicy Syntax"> - <figure><artwork> + <sourcecode type="asn.1"> TPMPolicy ::= SEQUENCE { - CommandCode [0] EXPLICIT INTEGER - CommandPolicy [1] EXPLICIT OCTET STRING + commandCode [0] EXPLICIT INTEGER, + commandPolicy [1] EXPLICIT OCTET STRING } - </artwork></figure> + </sourcecode> <t> The Fields of type TPMPolicy have the following meanings: </t> @@ -394,12 +394,12 @@ An alternate method (rfc include) is described in the references. policies. </t> <section title="TPMAuthPolicy Syntax"> - <figure><artwork> + <sourcecode type="asn.1"> TPMAuthPolicy ::= SEQUENCE { - Name [0] EXPLICIT UTF8STRING OPTIONAL - Policy [1] EXPLICIT SEQUENCE OF TPMPolicy + name [0] EXPLICIT UTF8String OPTIONAL, + policy [1] EXPLICIT SEQUENCE OF TPMPolicy } - </artwork></figure> + </sourcecode> <t> The Fields of type TPMAuthPolicy have the following meanings: </t> @@ -628,7 +628,6 @@ An alternate method (rfc include) is described in the references. implementation. </t> </section> - </middle> <back> <references title="Normative References"> @@ -680,5 +679,55 @@ An alternate method (rfc include) is described in the references. </front> </reference> </references> + <section anchor="asn1-module" title="ASN.1 Module"> + <sourcecode type="asn.1"> + TPM-Key-Module + + DEFINITIONS IMPLICIT TAGS ::= + BEGIN + + -- + -- Should import this but TCG hasn't yet published it or .10 + -- + id-tpmkey OBJECT IDENTIFIER ::= + {joint-iso-itu-t(2) international-organizations(23) 133 10 1} + + -- + -- OIDs defined by this RFC + -- + id-loadablekey OBJECT IDENTIFIER ::= {id-tpmkey 3} + id-importablekey OBJECT IDENTIFIER ::= {id-tpmkey 4} + id-sealedkey OBJECT IDENTIFIER ::= {id-tpmkey 5} + + TPMPolicy ::= SEQUENCE { + commandCode [0] EXPLICIT INTEGER, + commandPolicy [1] EXPLICIT OCTET STRING + } + + TPMAuthPolicy ::= SEQUENCE { + name [0] EXPLICIT UTF8String OPTIONAL, + policy [1] EXPLICIT SEQUENCE OF TPMPolicy + } + + TPMKeyType ::= OBJECT IDENTIFIER ( + id-loadablekey | + id-importablekey | + id-sealedkey + ) + + TPMKey ::= SEQUENCE { + type TPMKeyType, + emptyAuth [0] EXPLICIT BOOLEAN OPTIONAL, + policy [1] EXPLICIT SEQUENCE OF TPMPolicy OPTIONAL, + secret [2] EXPLICIT OCTET STRING OPTIONAL, + authPolicy [3] EXPLICIT SEQUENCE OF TPMAuthPolicy OPTIONAL, + parent INTEGER, + pubkey OCTET STRING, + privkey OCTET STRING + } + + END + </sourcecode> + </section> </back> </rfc> |