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

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

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp