summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/evp/evp_pbe.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/evp/evp_pbe.c')
-rw-r--r--crypto/openssl/crypto/evp/evp_pbe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/openssl/crypto/evp/evp_pbe.c b/crypto/openssl/crypto/evp/evp_pbe.c
index 224a422..0da88fd 100644
--- a/crypto/openssl/crypto/evp/evp_pbe.c
+++ b/crypto/openssl/crypto/evp/evp_pbe.c
@@ -57,9 +57,9 @@
*/
#include <stdio.h>
+#include "cryptlib.h"
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "cryptlib.h"
/* Password based encryption (PBE) functions */
@@ -69,8 +69,8 @@ static STACK *pbe_algs;
typedef struct {
int pbe_nid;
-EVP_CIPHER *cipher;
-EVP_MD *md;
+const EVP_CIPHER *cipher;
+const EVP_MD *md;
EVP_PBE_KEYGEN *keygen;
} EVP_PBE_CTL;
@@ -88,7 +88,7 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
char obj_tmp[80];
EVPerr(EVP_F_EVP_PBE_CIPHERINIT,EVP_R_UNKNOWN_PBE_ALGORITHM);
if (!pbe_obj) strcpy (obj_tmp, "NULL");
- else i2t_ASN1_OBJECT(obj_tmp, 80, pbe_obj);
+ else i2t_ASN1_OBJECT(obj_tmp, sizeof obj_tmp, pbe_obj);
ERR_add_error_data(2, "TYPE=", obj_tmp);
return 0;
}
@@ -112,7 +112,7 @@ static int pbe_cmp(const char * const *a, const char * const *b)
/* Add a PBE algorithm */
-int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md,
+int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
EVP_PBE_KEYGEN *keygen)
{
EVP_PBE_CTL *pbe_tmp;
OpenPOWER on IntegriCloud