~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/crypto/asymmetric_keys/pkcs7_parser.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /* PKCS#7 crypto data parser internal definitions
  3  *
  4  * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
  5  * Written by David Howells (dhowells@redhat.com)
  6  */
  7 
  8 #include <linux/oid_registry.h>
  9 #include <crypto/pkcs7.h>
 10 #include "x509_parser.h"
 11 
 12 #define kenter(FMT, ...) \
 13         pr_devel("==> %s("FMT")\n", __func__, ##__VA_ARGS__)
 14 #define kleave(FMT, ...) \
 15         pr_devel("<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
 16 
 17 struct pkcs7_signed_info {
 18         struct pkcs7_signed_info *next;
 19         struct x509_certificate *signer; /* Signing certificate (in msg->certs) */
 20         unsigned        index;
 21         bool            unsupported_crypto;     /* T if not usable due to missing crypto */
 22         bool            blacklisted;
 23 
 24         /* Message digest - the digest of the Content Data (or NULL) */
 25         const void      *msgdigest;
 26         unsigned        msgdigest_len;
 27 
 28         /* Authenticated Attribute data (or NULL) */
 29         unsigned        authattrs_len;
 30         const void      *authattrs;
 31         unsigned long   aa_set;
 32 #define sinfo_has_content_type          0
 33 #define sinfo_has_signing_time          1
 34 #define sinfo_has_message_digest        2
 35 #define sinfo_has_smime_caps            3
 36 #define sinfo_has_ms_opus_info          4
 37 #define sinfo_has_ms_statement_type     5
 38         time64_t        signing_time;
 39 
 40         /* Message signature.
 41          *
 42          * This contains the generated digest of _either_ the Content Data or
 43          * the Authenticated Attributes [RFC2315 9.3].  If the latter, one of
 44          * the attributes contains the digest of the Content Data within it.
 45          *
 46          * This also contains the issuing cert serial number and issuer's name
 47          * [PKCS#7 or CMS ver 1] or issuing cert's SKID [CMS ver 3].
 48          */
 49         struct public_key_signature *sig;
 50 };
 51 
 52 struct pkcs7_message {
 53         struct x509_certificate *certs; /* Certificate list */
 54         struct x509_certificate *crl;   /* Revocation list */
 55         struct pkcs7_signed_info *signed_infos;
 56         u8              version;        /* Version of cert (1 -> PKCS#7 or CMS; 3 -> CMS) */
 57         bool            have_authattrs; /* T if have authattrs */
 58 
 59         /* Content Data (or NULL) */
 60         enum OID        data_type;      /* Type of Data */
 61         size_t          data_len;       /* Length of Data */
 62         size_t          data_hdrlen;    /* Length of Data ASN.1 header */
 63         const void      *data;          /* Content Data (or 0) */
 64 };
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php