diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
commit | 61f5b6f33807306d09bccbc2dcad474d1d04ca40 (patch) | |
tree | 1680fa648df5f730df11ec433a512a1fadf0facd /crypto/pkcs12/p12_mutl.c | |
parent | 779cc0bca98e35830db455f34b986b86a2d2f822 (diff) |
Work with -pedantic!
Diffstat (limited to 'crypto/pkcs12/p12_mutl.c')
-rw-r--r-- | crypto/pkcs12/p12_mutl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c index 2d16e610d2..1699619cf3 100644 --- a/crypto/pkcs12/p12_mutl.c +++ b/crypto/pkcs12/p12_mutl.c @@ -63,8 +63,8 @@ #include "pkcs12.h" /* Generate a MAC */ -int PKCS12_gen_mac (PKCS12 *p12, unsigned char *pass, int passlen, - unsigned char *mac, unsigned int *maclen) +int PKCS12_gen_mac (PKCS12 *p12, const char *pass, int passlen, + unsigned char *mac, unsigned int *maclen) { const EVP_MD *md_type; HMAC_CTX hmac; @@ -92,7 +92,7 @@ int PKCS12_gen_mac (PKCS12 *p12, unsigned char *pass, int passlen, } /* Verify the mac */ -int PKCS12_verify_mac (PKCS12 *p12, unsigned char *pass, int passlen) +int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen) { unsigned char mac[EVP_MAX_MD_SIZE]; unsigned int maclen; @@ -114,11 +114,12 @@ int PKCS12_verify_mac (PKCS12 *p12, unsigned char *pass, int passlen) /* Set a mac */ -int PKCS12_set_mac (PKCS12 *p12, unsigned 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) { unsigned char mac[EVP_MAX_MD_SIZE]; - int maclen; + unsigned int maclen; + if (!md_type) md_type = EVP_sha1(); if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) == PKCS12_ERROR) { |