| OLD | NEW | 
|---|
| 1 /* pkcs12.h */ | 1 /* pkcs12.h */ | 
| 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  */ | 
| 5 /* ==================================================================== | 5 /* ==================================================================== | 
| 6  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved. | 6  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved. | 
| 7  * | 7  * | 
| 8  * Redistribution and use in source and binary forms, with or without | 8  * Redistribution and use in source and binary forms, with or without | 
| 9  * modification, are permitted provided that the following conditions | 9  * modification, are permitted provided that the following conditions | 
| 10  * are met: | 10  * are met: | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 101 ASN1_OCTET_STRING *salt; | 101 ASN1_OCTET_STRING *salt; | 
| 102 ASN1_INTEGER *iter;     /* defaults to 1 */ | 102 ASN1_INTEGER *iter;     /* defaults to 1 */ | 
| 103 } PKCS12_MAC_DATA; | 103 } PKCS12_MAC_DATA; | 
| 104 | 104 | 
| 105 typedef struct { | 105 typedef struct { | 
| 106 ASN1_INTEGER *version; | 106 ASN1_INTEGER *version; | 
| 107 PKCS12_MAC_DATA *mac; | 107 PKCS12_MAC_DATA *mac; | 
| 108 PKCS7 *authsafes; | 108 PKCS7 *authsafes; | 
| 109 } PKCS12; | 109 } PKCS12; | 
| 110 | 110 | 
| 111 PREDECLARE_STACK_OF(PKCS12_SAFEBAG) |  | 
| 112 |  | 
| 113 typedef struct { | 111 typedef struct { | 
| 114 ASN1_OBJECT *type; | 112 ASN1_OBJECT *type; | 
| 115 union { | 113 union { | 
| 116         struct pkcs12_bag_st *bag; /* secret, crl and certbag */ | 114         struct pkcs12_bag_st *bag; /* secret, crl and certbag */ | 
| 117         struct pkcs8_priv_key_info_st   *keybag; /* keybag */ | 115         struct pkcs8_priv_key_info_st   *keybag; /* keybag */ | 
| 118         X509_SIG *shkeybag; /* shrouded key bag */ | 116         X509_SIG *shkeybag; /* shrouded key bag */ | 
| 119         STACK_OF(PKCS12_SAFEBAG) *safes; | 117         STACK_OF(PKCS12_SAFEBAG) *safes; | 
| 120         ASN1_TYPE *other; | 118         ASN1_TYPE *other; | 
| 121 }value; | 119 }value; | 
| 122 STACK_OF(X509_ATTRIBUTE) *attrib; | 120 STACK_OF(X509_ATTRIBUTE) *attrib; | 
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 225                          ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_M
     D *md_type, | 223                          ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_M
     D *md_type, | 
| 226                          int en_de); | 224                          int en_de); | 
| 227 int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, | 225 int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, | 
| 228                          unsigned char *mac, unsigned int *maclen); | 226                          unsigned char *mac, unsigned int *maclen); | 
| 229 int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); | 227 int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); | 
| 230 int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, | 228 int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, | 
| 231                    unsigned char *salt, int saltlen, int iter, | 229                    unsigned char *salt, int saltlen, int iter, | 
| 232                    const EVP_MD *md_type); | 230                    const EVP_MD *md_type); | 
| 233 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, | 231 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, | 
| 234                                          int saltlen, const EVP_MD *md_type); | 232                                          int saltlen, const EVP_MD *md_type); | 
| 235 #if defined(NETWARE) || defined(OPENSSL_SYS_NETWARE) |  | 
| 236 /* Rename these functions to avoid name clashes on NetWare OS */ |  | 
| 237 unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, unsigned char **uni,
      int *unilen); | 233 unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, unsigned char **uni,
      int *unilen); | 
| 238 char *OPENSSL_uni2asc(unsigned char *uni, int unilen); | 234 char *OPENSSL_uni2asc(unsigned char *uni, int unilen); | 
| 239 #else | 235 | 
| 240 unsigned char *asc2uni(const char *asc, int asclen, unsigned char **uni, int *un
     ilen); |  | 
| 241 char *uni2asc(unsigned char *uni, int unilen); |  | 
| 242 #endif |  | 
| 243 DECLARE_ASN1_FUNCTIONS(PKCS12) | 236 DECLARE_ASN1_FUNCTIONS(PKCS12) | 
| 244 DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA) | 237 DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA) | 
| 245 DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG) | 238 DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG) | 
| 246 DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS) | 239 DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS) | 
| 247 | 240 | 
| 248 DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS) | 241 DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS) | 
| 249 DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES) | 242 DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES) | 
| 250 | 243 | 
| 251 void PKCS12_PBE_add(void); | 244 void PKCS12_PBE_add(void); | 
| 252 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, | 245 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 329 #define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR           115 | 322 #define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR           115 | 
| 330 #define PKCS12_R_PKCS12_CIPHERFINAL_ERROR                116 | 323 #define PKCS12_R_PKCS12_CIPHERFINAL_ERROR                116 | 
| 331 #define PKCS12_R_PKCS12_PBE_CRYPT_ERROR                  117 | 324 #define PKCS12_R_PKCS12_PBE_CRYPT_ERROR                  117 | 
| 332 #define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM                118 | 325 #define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM                118 | 
| 333 #define PKCS12_R_UNSUPPORTED_PKCS12_MODE                 119 | 326 #define PKCS12_R_UNSUPPORTED_PKCS12_MODE                 119 | 
| 334 | 327 | 
| 335 #ifdef  __cplusplus | 328 #ifdef  __cplusplus | 
| 336 } | 329 } | 
| 337 #endif | 330 #endif | 
| 338 #endif | 331 #endif | 
| OLD | NEW | 
|---|