From 135883505078a868349e0a3c24514099e3cb2dac Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 9 Mar 2001 02:51:02 +0000 Subject: Change the EVP_somecipher() and EVP_somedigest() functions to return constant EVP_MD and EVP_CIPHER pointers. Update docs. --- crypto/pkcs12/p12_crpt.c | 2 +- crypto/pkcs12/p12_mutl.c | 4 ++-- crypto/pkcs12/pkcs12.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crypto/pkcs12') diff --git a/crypto/pkcs12/p12_crpt.c b/crypto/pkcs12/p12_crpt.c index b2659f60ef..2a6de32d81 100644 --- a/crypto/pkcs12/p12_crpt.c +++ b/crypto/pkcs12/p12_crpt.c @@ -85,7 +85,7 @@ EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(), } int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md, int en_de) + ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) { PBEPARAM *pbe; int saltlen, iter; diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c index 82f366d33e..32b6e17c24 100644 --- a/crypto/pkcs12/p12_mutl.c +++ b/crypto/pkcs12/p12_mutl.c @@ -113,7 +113,7 @@ int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen) /* Set a mac */ int PKCS12_set_mac (PKCS12 *p12, const char *pass, int passlen, - unsigned char *salt, int saltlen, int iter, EVP_MD *md_type) + unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) { unsigned char mac[EVP_MAX_MD_SIZE]; unsigned int maclen; @@ -137,7 +137,7 @@ int PKCS12_set_mac (PKCS12 *p12, const char *pass, int passlen, /* Set up a mac structure */ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen, - EVP_MD *md_type) + const EVP_MD *md_type) { if (!(p12->mac = PKCS12_MAC_DATA_new())) return PKCS12_ERROR; if (iter > 1) { diff --git a/crypto/pkcs12/pkcs12.h b/crypto/pkcs12/pkcs12.h index 1531ee7926..01c20ddc6e 100644 --- a/crypto/pkcs12/pkcs12.h +++ b/crypto/pkcs12/pkcs12.h @@ -220,16 +220,16 @@ int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, unsigned char *out, const EVP_MD *md_type); int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type); int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md_type, + ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md_type, int en_de); int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *mac, unsigned int *maclen); int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, - EVP_MD *md_type); + const EVP_MD *md_type); int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, - int saltlen, EVP_MD *md_type); + int saltlen, const EVP_MD *md_type); unsigned char *asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen); char *uni2asc(unsigned char *uni, int unilen); -- cgit v1.2.3