Debian Codegraph @

lib_pypy/_cffi_ssl/_cffi_src/openssl/pkcs7.py

raw symbols SCIP
1 # This file is dual licensed under the terms of the Apache License, Version
2 # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 # for complete details.
4
5 from __future__ import absolute_import, division, print_function
6
7 INCLUDES = """
8 #include <openssl/pkcs7.h>
9 """
10
11 TYPES = """
12 typedef struct {
13 Cryptography_STACK_OF_X509 *cert;
14 Cryptography_STACK_OF_X509_CRL *crl;
15 ...;
16 } PKCS7_SIGNED;
17
18 typedef struct {
19 Cryptography_STACK_OF_X509 *cert;
20 Cryptography_STACK_OF_X509_CRL *crl;
21 ...;
22 } PKCS7_SIGN_ENVELOPE;
23
24 typedef ... PKCS7_DIGEST;
25 typedef ... PKCS7_ENCRYPT;
26 typedef ... PKCS7_ENVELOPE;
27
28 typedef struct {
29 ASN1_OBJECT *type;
30 union {
31 char *ptr;
32 ASN1_OCTET_STRING *data;
33 PKCS7_SIGNED *sign;
34 PKCS7_ENVELOPE *enveloped;
35 PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
36 PKCS7_DIGEST *digest;
37 PKCS7_ENCRYPT *encrypted;
38 ASN1_TYPE *other;
39 } d;
40 ...;
41 } PKCS7;
42
43 static const int PKCS7_BINARY;
44 static const int PKCS7_DETACHED;
45 static const int PKCS7_NOATTR;
46 static const int PKCS7_NOCERTS;
47 static const int PKCS7_NOCHAIN;
48 static const int PKCS7_NOINTERN;
49 static const int PKCS7_NOSIGS;
50 static const int PKCS7_NOSMIMECAP;
51 static const int PKCS7_NOVERIFY;
52 static const int PKCS7_STREAM;
53 static const int PKCS7_TEXT;
54 """
55
56 FUNCTIONS = """
57 PKCS7 *SMIME_read_PKCS7(BIO *, BIO **);
58 int SMIME_write_PKCS7(BIO *, PKCS7 *, BIO *, int);
59
60 void PKCS7_free(PKCS7 *);
61
62 PKCS7 *PKCS7_sign(X509 *, EVP_PKEY *, Cryptography_STACK_OF_X509 *,
63 BIO *, int);
64 int PKCS7_verify(PKCS7 *, Cryptography_STACK_OF_X509 *, X509_STORE *, BIO *,
65 BIO *, int);
66 Cryptography_STACK_OF_X509 *PKCS7_get0_signers(PKCS7 *,
67 Cryptography_STACK_OF_X509 *,
68 int);
69
70 PKCS7 *PKCS7_encrypt(Cryptography_STACK_OF_X509 *, BIO *,
71 const EVP_CIPHER *, int);
72 int PKCS7_decrypt(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int);
73
74 BIO *PKCS7_dataInit(PKCS7 *, BIO *);
75 int PKCS7_type_is_encrypted(PKCS7 *);
76 int PKCS7_type_is_signed(PKCS7 *);
77 int PKCS7_type_is_enveloped(PKCS7 *);
78 int PKCS7_type_is_signedAndEnveloped(PKCS7 *);
79 int PKCS7_type_is_data(PKCS7 *);
80 int PKCS7_type_is_digest(PKCS7 *);
81 """
82
83 CUSTOMIZATIONS = ""