These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / crypto / asymmetric_keys / pkcs7_parser.h
index efc7dc9..a66b19e 100644 (file)
@@ -21,9 +21,9 @@
 struct pkcs7_signed_info {
        struct pkcs7_signed_info *next;
        struct x509_certificate *signer; /* Signing certificate (in msg->certs) */
-       unsigned index;
-       bool trusted;
-       bool unsupported_crypto;        /* T if not usable due to missing crypto */
+       unsigned        index;
+       bool            trusted;
+       bool            unsupported_crypto;     /* T if not usable due to missing crypto */
 
        /* Message digest - the digest of the Content Data (or NULL) */
        const void      *msgdigest;
@@ -32,8 +32,18 @@ struct pkcs7_signed_info {
        /* Authenticated Attribute data (or NULL) */
        unsigned        authattrs_len;
        const void      *authattrs;
+       unsigned long   aa_set;
+#define        sinfo_has_content_type          0
+#define        sinfo_has_signing_time          1
+#define        sinfo_has_message_digest        2
+#define sinfo_has_smime_caps           3
+#define        sinfo_has_ms_opus_info          4
+#define        sinfo_has_ms_statement_type     5
+       time64_t        signing_time;
 
-       /* Issuing cert serial number and issuer's name */
+       /* Issuing cert serial number and issuer's name [PKCS#7 or CMS ver 1]
+        * or issuing cert's SKID [CMS ver 3].
+        */
        struct asymmetric_key_id *signing_cert_id;
 
        /* Message signature.
@@ -50,6 +60,8 @@ struct pkcs7_message {
        struct x509_certificate *certs; /* Certificate list */
        struct x509_certificate *crl;   /* Revocation list */
        struct pkcs7_signed_info *signed_infos;
+       u8              version;        /* Version of cert (1 -> PKCS#7 or CMS; 3 -> CMS) */
+       bool            have_authattrs; /* T if have authattrs */
 
        /* Content Data (or NULL) */
        enum OID        data_type;      /* Type of Data */