diff options
Diffstat (limited to 'src/lib/libcrypto/pkcs12/pkcs12_local.h')
-rw-r--r-- | src/lib/libcrypto/pkcs12/pkcs12_local.h | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/pkcs12_local.h b/src/lib/libcrypto/pkcs12/pkcs12_local.h index 8d82d2f462..dfdcdce1f9 100644 --- a/src/lib/libcrypto/pkcs12/pkcs12_local.h +++ b/src/lib/libcrypto/pkcs12/pkcs12_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkcs12_local.h,v 1.4 2024/01/25 13:44:08 tb Exp $ */ | 1 | /* $OpenBSD: pkcs12_local.h,v 1.5 2024/03/02 10:15:16 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -96,6 +96,79 @@ struct pkcs12_bag_st { | |||
96 | } value; | 96 | } value; |
97 | }; | 97 | }; |
98 | 98 | ||
99 | extern const ASN1_ITEM PKCS12_SAFEBAGS_it; | ||
100 | extern const ASN1_ITEM PKCS12_AUTHSAFES_it; | ||
101 | |||
102 | PKCS12_BAGS *PKCS12_BAGS_new(void); | ||
103 | void PKCS12_BAGS_free(PKCS12_BAGS *a); | ||
104 | PKCS12_BAGS *d2i_PKCS12_BAGS(PKCS12_BAGS **a, const unsigned char **in, long len); | ||
105 | int i2d_PKCS12_BAGS(PKCS12_BAGS *a, unsigned char **out); | ||
106 | extern const ASN1_ITEM PKCS12_BAGS_it; | ||
107 | |||
108 | PKCS12_MAC_DATA *PKCS12_MAC_DATA_new(void); | ||
109 | void PKCS12_MAC_DATA_free(PKCS12_MAC_DATA *a); | ||
110 | PKCS12_MAC_DATA *d2i_PKCS12_MAC_DATA(PKCS12_MAC_DATA **a, const unsigned char **in, long len); | ||
111 | int i2d_PKCS12_MAC_DATA(PKCS12_MAC_DATA *a, unsigned char **out); | ||
112 | extern const ASN1_ITEM PKCS12_MAC_DATA_it; | ||
113 | |||
114 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8); | ||
115 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8); | ||
116 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_cert(X509 *x509); | ||
117 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_crl(X509_CRL *crl); | ||
118 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt(int pbe_nid, | ||
119 | const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, | ||
120 | PKCS8_PRIV_KEY_INFO *p8); | ||
121 | |||
122 | PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert); | ||
123 | PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags, EVP_PKEY *key, | ||
124 | int key_usage, int iter, int key_nid, const char *pass); | ||
125 | int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags, | ||
126 | int safe_nid, int iter, const char *pass); | ||
127 | PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid); | ||
128 | |||
129 | int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, | ||
130 | int namelen); | ||
131 | int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, | ||
132 | int namelen); | ||
133 | int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, const unsigned char *name, | ||
134 | int namelen); | ||
135 | int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, | ||
136 | int namelen); | ||
137 | |||
138 | int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, | ||
139 | unsigned char *mac, unsigned int *maclen); | ||
140 | |||
141 | ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs, | ||
142 | int attr_nid); | ||
143 | |||
144 | PKCS12 *PKCS12_init(int mode); | ||
145 | |||
146 | void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it, | ||
147 | const char *pass, int passlen, const ASN1_OCTET_STRING *oct, int zbuf); | ||
148 | ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, | ||
149 | const ASN1_ITEM *it, const char *pass, int passlen, void *obj, int zbuf); | ||
150 | PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, | ||
151 | int nid1, int nid2); | ||
152 | |||
153 | int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, | ||
154 | int saltlen, int id, int iter, int n, unsigned char *out, | ||
155 | const EVP_MD *md_type); | ||
156 | int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | ||
157 | int saltlen, int id, int iter, int n, unsigned char *out, | ||
158 | const EVP_MD *md_type); | ||
159 | |||
160 | int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); | ||
161 | PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); | ||
162 | PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, | ||
163 | unsigned char *salt, int saltlen, int iter, STACK_OF(PKCS12_SAFEBAG) *bags); | ||
164 | |||
165 | unsigned char *PKCS12_pbe_crypt(const X509_ALGOR *algor, const char *pass, | ||
166 | int passlen, const unsigned char *in, int inlen, unsigned char **data, | ||
167 | int *datalen, int en_de); | ||
168 | |||
169 | int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, | ||
170 | int saltlen, const EVP_MD *md_type); | ||
171 | |||
99 | /* XXX - should go into pkcs7_local.h. */ | 172 | /* XXX - should go into pkcs7_local.h. */ |
100 | ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7); | 173 | ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7); |
101 | 174 | ||