new file mode 100644
@@ -0,0 +1,23 @@
+---
+--- Note: This isn't quite the definition in the standard
+--- However, the Linux asn.1 parser doesn't understand
+--- [2] EXPLICIT SEQUENCE OF OPTIONAL
+--- So there's an extra intermediate TPMPolicySequence
+--- definition to work around this
+
+TPMKey ::= SEQUENCE {
+ type OBJECT IDENTIFIER ({tpmkey_type}),
+ emptyAuth [0] EXPLICIT BOOLEAN OPTIONAL,
+ policy [1] EXPLICIT TPMPolicySequence OPTIONAL,
+ secret [2] EXPLICIT OCTET STRING OPTIONAL,
+ parent INTEGER ({tpmkey_parent}),
+ pubkey OCTET STRING ({tpmkey_pub}),
+ privkey OCTET STRING ({tpmkey_priv})
+ }
+
+TPMPolicySequence ::= SEQUENCE OF TPMPolicy
+
+TPMPolicy ::= SEQUENCE {
+ commandCode [0] EXPLICIT INTEGER ({tpmkey_code}),
+ commandPolicy [1] EXPLICIT OCTET STRING ({tpmkey_policy})
+ }
Copied the TPM2 ASN1 definition from trusted-keys Signed-off-by: James Prestwood <prestwoj@gmail.com> --- crypto/asymmetric_keys/tpm2key.asn1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 crypto/asymmetric_keys/tpm2key.asn1