mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
Rebase fixes
- wolfSSL_CTX_set1_groups_list and wolfSSL_set1_groups_list should use wolfSSL_CTX_set1_groups and wolfSSL_set1_groups respectively because it converts to correct groups representation - Change to using "SHA1" as main name for SHA1
This commit is contained in:
@ -35155,8 +35155,7 @@ int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, char *list)
|
|||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return wolfSSL_CTX_set_groups(ctx, groups, count) == WOLFSSL_SUCCESS ?
|
return wolfSSL_CTX_set1_groups(ctx, groups, count);
|
||||||
WOLFSSL_SUCCESS : WOLFSSL_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wolfSSL_set1_groups_list(WOLFSSL *ssl, char *list)
|
int wolfSSL_set1_groups_list(WOLFSSL *ssl, char *list)
|
||||||
@ -35173,8 +35172,7 @@ int wolfSSL_set1_groups_list(WOLFSSL *ssl, char *list)
|
|||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return wolfSSL_set_groups(ssl, groups, count) == WOLFSSL_SUCCESS ?
|
return wolfSSL_set1_groups(ssl, groups, count);
|
||||||
WOLFSSL_SUCCESS : WOLFSSL_FAILURE;
|
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_TLS13 */
|
#endif /* WOLFSSL_TLS13 */
|
||||||
|
|
||||||
|
@ -27060,6 +27060,12 @@ static void test_wolfSSL_EVP_MD_size(void)
|
|||||||
AssertIntEQ(wolfSSL_EVP_MD_CTX_block_size(&mdCtx), WC_SHA_BLOCK_SIZE);
|
AssertIntEQ(wolfSSL_EVP_MD_CTX_block_size(&mdCtx), WC_SHA_BLOCK_SIZE);
|
||||||
AssertIntEQ(wolfSSL_EVP_MD_CTX_cleanup(&mdCtx), 1);
|
AssertIntEQ(wolfSSL_EVP_MD_CTX_cleanup(&mdCtx), 1);
|
||||||
|
|
||||||
|
wolfSSL_EVP_MD_CTX_init(&mdCtx);
|
||||||
|
|
||||||
|
AssertIntEQ(wolfSSL_EVP_DigestInit(&mdCtx, "SHA1"), 1);
|
||||||
|
AssertIntEQ(wolfSSL_EVP_MD_CTX_size(&mdCtx), WC_SHA_DIGEST_SIZE);
|
||||||
|
AssertIntEQ(wolfSSL_EVP_MD_CTX_block_size(&mdCtx), WC_SHA_BLOCK_SIZE);
|
||||||
|
AssertIntEQ(wolfSSL_EVP_MD_CTX_cleanup(&mdCtx), 1);
|
||||||
#endif
|
#endif
|
||||||
/* error case */
|
/* error case */
|
||||||
wolfSSL_EVP_MD_CTX_init(&mdCtx);
|
wolfSSL_EVP_MD_CTX_init(&mdCtx);
|
||||||
|
@ -2107,6 +2107,7 @@ static const struct s_ent {
|
|||||||
|
|
||||||
#ifndef NO_SHA
|
#ifndef NO_SHA
|
||||||
{WC_HASH_TYPE_SHA, NID_sha1, "SHA1"},
|
{WC_HASH_TYPE_SHA, NID_sha1, "SHA1"},
|
||||||
|
{WC_HASH_TYPE_SHA, NID_sha1, "SHA"}, /* Leave for backwards compatibility */
|
||||||
#endif /* NO_SHA */
|
#endif /* NO_SHA */
|
||||||
|
|
||||||
#ifdef WOLFSSL_SHA224
|
#ifdef WOLFSSL_SHA224
|
||||||
@ -6883,7 +6884,10 @@ int wolfSSL_EVP_get_hashinfo(const WOLFSSL_EVP_MD* evp,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
if (XSTRNCMP("SHA1", evp, 4) == 0) {
|
||||||
|
hash = WC_HASH_TYPE_SHA;
|
||||||
|
}
|
||||||
|
else {
|
||||||
WOLFSSL_MSG("Unknown SHA hash");
|
WOLFSSL_MSG("Unknown SHA hash");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user