Fix declarations for EVP_VerifyFinal and RSA_private_encrypt

This commit is contained in:
Eric Blankenhorn
2021-05-13 10:48:49 -05:00
parent bab0d9bd4a
commit 9eebaaf352
4 changed files with 5 additions and 5 deletions

View File

@@ -51680,7 +51680,7 @@ int wolfSSL_RSA_public_decrypt(int flen, const unsigned char* from,
* rsa Key to use for encryption * rsa Key to use for encryption
* padding Type of RSA padding to use. * padding Type of RSA padding to use.
*/ */
int wolfSSL_RSA_private_encrypt(int len, unsigned char* in, int wolfSSL_RSA_private_encrypt(int len, const unsigned char* in,
unsigned char* out, WOLFSSL_RSA* rsa, int padding) unsigned char* out, WOLFSSL_RSA* rsa, int padding)
{ {
int sz = 0; int sz = 0;

View File

@@ -1817,7 +1817,7 @@ WOLFSSL_API int wolfSSL_EVP_PKEY_sign(WOLFSSL_EVP_PKEY_CTX *ctx, unsigned char *
switch (ctx->pkey->type) { switch (ctx->pkey->type) {
#if !defined(NO_RSA) && !defined(HAVE_USER_RSA) #if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
case EVP_PKEY_RSA: case EVP_PKEY_RSA:
len = wolfSSL_RSA_private_encrypt((int)tbslen, (unsigned char*)tbs, sig, len = wolfSSL_RSA_private_encrypt((int)tbslen, tbs, sig,
ctx->pkey->rsa, ctx->padding); ctx->pkey->rsa, ctx->padding);
if (len < 0) if (len < 0)
break; break;
@@ -2443,7 +2443,7 @@ int wolfSSL_EVP_VerifyUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t l
* returns WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on failure * returns WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on failure
*/ */
int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx, int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx,
unsigned char*sig, unsigned int siglen, WOLFSSL_EVP_PKEY *pkey) const unsigned char*sig, unsigned int siglen, WOLFSSL_EVP_PKEY *pkey)
{ {
int ret; int ret;
unsigned char md[WC_MAX_DIGEST_SIZE]; unsigned char md[WC_MAX_DIGEST_SIZE];

View File

@@ -592,7 +592,7 @@ WOLFSSL_API int wolfSSL_EVP_SignInit_ex(WOLFSSL_EVP_MD_CTX* ctx,
WOLFSSL_ENGINE *impl); WOLFSSL_ENGINE *impl);
WOLFSSL_API int wolfSSL_EVP_SignUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len); WOLFSSL_API int wolfSSL_EVP_SignUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len);
WOLFSSL_API int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx, WOLFSSL_API int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx,
unsigned char* sig, unsigned int sig_len, WOLFSSL_EVP_PKEY *pkey); const unsigned char* sig, unsigned int sig_len, WOLFSSL_EVP_PKEY *pkey);
WOLFSSL_API int wolfSSL_EVP_VerifyInit(WOLFSSL_EVP_MD_CTX *ctx, const WOLFSSL_EVP_MD *type); WOLFSSL_API int wolfSSL_EVP_VerifyInit(WOLFSSL_EVP_MD_CTX *ctx, const WOLFSSL_EVP_MD *type);
WOLFSSL_API int wolfSSL_EVP_VerifyUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len); WOLFSSL_API int wolfSSL_EVP_VerifyUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len);

View File

@@ -107,7 +107,7 @@ WOLFSSL_API int wolfSSL_RSA_public_encrypt(int len, const unsigned char* fr,
unsigned char* to, WOLFSSL_RSA*, int padding); unsigned char* to, WOLFSSL_RSA*, int padding);
WOLFSSL_API int wolfSSL_RSA_private_decrypt(int len, const unsigned char* fr, WOLFSSL_API int wolfSSL_RSA_private_decrypt(int len, const unsigned char* fr,
unsigned char* to, WOLFSSL_RSA*, int padding); unsigned char* to, WOLFSSL_RSA*, int padding);
WOLFSSL_API int wolfSSL_RSA_private_encrypt(int len, unsigned char* in, WOLFSSL_API int wolfSSL_RSA_private_encrypt(int len, const unsigned char* in,
unsigned char* out, WOLFSSL_RSA* rsa, int padding); unsigned char* out, WOLFSSL_RSA* rsa, int padding);
WOLFSSL_API int wolfSSL_RSA_size(const WOLFSSL_RSA*); WOLFSSL_API int wolfSSL_RSA_size(const WOLFSSL_RSA*);