diff --git a/src/ssl.c b/src/ssl.c index b1bdb8f28..a1c8cf46a 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -13198,8 +13198,8 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md) /* return WOLFSSL_SUCCESS on ok, 0 on failure to match API compatibility */ int wolfSSL_EVP_CipherInit(WOLFSSL_EVP_CIPHER_CTX* ctx, - const WOLFSSL_EVP_CIPHER* type, byte* key, - byte* iv, int enc) + const WOLFSSL_EVP_CIPHER* type, const byte* key, + const byte* iv, int enc) { int ret = -1; /* failure local, during function 0 means success because internal functions work that way */ @@ -18528,7 +18528,7 @@ int wolfSSL_get_ex_data_X509_STORE_CTX_idx(void) * f callback function to use */ void wolfSSL_CTX_set_info_callback(WOLFSSL_CTX* ctx, - void (*f)(WOLFSSL* ssl, int type, int val)) + void (*f)(const WOLFSSL* ssl, int type, int val)) { WOLFSSL_ENTER("wolfSSL_CTX_set_info_callback"); if (ctx == NULL) { diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 0e4f9683b..f90a07e37 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -151,7 +151,8 @@ WOLFSSL_API int wolfSSL_EVP_EncryptFinal(WOLFSSL_EVP_CIPHER_CTX *ctx, WOLFSSL_API int wolfSSL_EVP_CipherInit_ex(WOLFSSL_EVP_CIPHER_CTX* ctx, const WOLFSSL_EVP_CIPHER* type, WOLFSSL_ENGINE *impl, - unsigned char* key, unsigned char* iv, + const unsigned char* key, + const unsigned char* iv, int enc) { (void)impl; diff --git a/wolfssl/openssl/evp.h b/wolfssl/openssl/evp.h index e8332d3d6..9af66cc8c 100644 --- a/wolfssl/openssl/evp.h +++ b/wolfssl/openssl/evp.h @@ -270,12 +270,14 @@ WOLFSSL_API int wolfSSL_EVP_Cipher_key_length(const WOLFSSL_EVP_CIPHER* c); WOLFSSL_API int wolfSSL_EVP_CipherInit(WOLFSSL_EVP_CIPHER_CTX* ctx, const WOLFSSL_EVP_CIPHER* type, - unsigned char* key, unsigned char* iv, + const unsigned char* key, + const unsigned char* iv, int enc); WOLFSSL_API int wolfSSL_EVP_CipherInit_ex(WOLFSSL_EVP_CIPHER_CTX* ctx, const WOLFSSL_EVP_CIPHER* type, WOLFSSL_ENGINE *impl, - unsigned char* key, unsigned char* iv, + const unsigned char* key, + const unsigned char* iv, int enc); WOLFSSL_API int wolfSSL_EVP_EncryptInit(WOLFSSL_EVP_CIPHER_CTX* ctx, const WOLFSSL_EVP_CIPHER* type, diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index b6b90a9a6..2d67ef844 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -588,7 +588,7 @@ WOLFSSL_API typedef int (*VerifyCallback)(int, WOLFSSL_X509_STORE_CTX*); typedef int (pem_password_cb)(char*, int, int, void*); #ifdef OPENSSL_EXTRA -typedef void (CallbackInfoState)(WOLFSSL*, int, int); +typedef void (CallbackInfoState)(const WOLFSSL*, int, int); typedef struct WOLFSSL_CRYPTO_EX_DATA { WOLFSSL_STACK* data; @@ -959,7 +959,7 @@ WOLFSSL_API void wolfSSL_CTX_set_default_passwd_cb(WOLFSSL_CTX*, WOLFSSL_API void wolfSSL_CTX_set_info_callback(WOLFSSL_CTX*, - void (*)(WOLFSSL* ssl, int type, int val)); + void (*)(const WOLFSSL* ssl, int type, int val)); WOLFSSL_API unsigned long wolfSSL_ERR_peek_error(void); WOLFSSL_API int wolfSSL_GET_REASON(int);