forked from wolfSSL/wolfssl
Remove unused internal API
This commit is contained in:
@@ -3048,7 +3048,7 @@ static WC_INLINE void AddSuiteHashSigAlgo(byte* hashSigAlgo, byte macAlgo,
|
||||
}
|
||||
}
|
||||
|
||||
void InitSuitesHashSigAlgo_ex2(byte* hashSigAlgo, int haveSig, int tls1_2,
|
||||
void InitSuitesHashSigAlgo(byte* hashSigAlgo, int haveSig, int tls1_2,
|
||||
int keySz, word16* len)
|
||||
{
|
||||
word16 idx = 0;
|
||||
@@ -3155,30 +3155,6 @@ void InitSuitesHashSigAlgo_ex2(byte* hashSigAlgo, int haveSig, int tls1_2,
|
||||
*len = idx;
|
||||
}
|
||||
|
||||
void InitSuitesHashSigAlgo(Suites* suites, int haveECDSAsig, int haveRSAsig,
|
||||
int haveFalconSig, int haveDilithiumSig, int haveAnon, int tls1_2,
|
||||
int keySz)
|
||||
{
|
||||
InitSuitesHashSigAlgo_ex(suites->hashSigAlgo, haveECDSAsig, haveRSAsig,
|
||||
haveFalconSig, haveDilithiumSig, haveAnon, tls1_2, keySz,
|
||||
&suites->hashSigAlgoSz);
|
||||
}
|
||||
|
||||
void InitSuitesHashSigAlgo_ex(byte* hashSigAlgo, int haveECDSAsig,
|
||||
int haveRSAsig, int haveFalconSig, int haveDilithiumSig, int haveAnon,
|
||||
int tls1_2, int keySz, word16* len)
|
||||
{
|
||||
int have = 0;
|
||||
|
||||
if (haveECDSAsig) have |= SIG_ECDSA;
|
||||
if (haveRSAsig) have |= SIG_RSA;
|
||||
if (haveFalconSig) have |= SIG_FALCON;
|
||||
if (haveDilithiumSig) have |= SIG_DILITHIUM;
|
||||
if (haveAnon) have |= SIG_ANON;
|
||||
|
||||
InitSuitesHashSigAlgo_ex2(hashSigAlgo, have, tls1_2, keySz, len);
|
||||
}
|
||||
|
||||
int AllocateCtxSuites(WOLFSSL_CTX* ctx)
|
||||
{
|
||||
if (ctx->suites == NULL) {
|
||||
@@ -4274,7 +4250,7 @@ void InitSuites(Suites* suites, ProtocolVersion pv, int keySz, word16 haveRSA,
|
||||
haveSig |= haveFalconSig ? SIG_FALCON : 0;
|
||||
haveSig |= haveDilithiumSig ? SIG_DILITHIUM : 0;
|
||||
haveSig &= ~SIG_ANON;
|
||||
InitSuitesHashSigAlgo_ex2(suites->hashSigAlgo, haveSig, tls1_2, keySz,
|
||||
InitSuitesHashSigAlgo(suites->hashSigAlgo, haveSig, tls1_2, keySz,
|
||||
&suites->hashSigAlgoSz);
|
||||
}
|
||||
}
|
||||
@@ -26729,7 +26705,7 @@ static int ParseCipherList(Suites* suites,
|
||||
#endif
|
||||
{
|
||||
suites->suiteSz = (word16)idx;
|
||||
InitSuitesHashSigAlgo_ex2(suites->hashSigAlgo, haveSig, 1, keySz,
|
||||
InitSuitesHashSigAlgo(suites->hashSigAlgo, haveSig, 1, keySz,
|
||||
&suites->hashSigAlgoSz);
|
||||
}
|
||||
|
||||
@@ -26913,7 +26889,7 @@ int SetCipherListFromBytes(WOLFSSL_CTX* ctx, Suites* suites, const byte* list,
|
||||
haveSig |= haveFalconSig ? SIG_FALCON : 0;
|
||||
haveSig |= haveDilithiumSig ? SIG_DILITHIUM : 0;
|
||||
haveSig |= haveAnon ? SIG_ANON : 0;
|
||||
InitSuitesHashSigAlgo_ex2(suites->hashSigAlgo, haveSig, 1, keySz,
|
||||
InitSuitesHashSigAlgo(suites->hashSigAlgo, haveSig, 1, keySz,
|
||||
&suites->hashSigAlgoSz);
|
||||
#ifdef HAVE_RENEGOTIATION_INDICATION
|
||||
if (ctx->method->side == WOLFSSL_CLIENT_END) {
|
||||
|
@@ -7647,12 +7647,12 @@ static int SendTls13CertificateRequest(WOLFSSL* ssl, byte* reqCtx,
|
||||
return SIDE_ERROR;
|
||||
|
||||
/* Get the length of the hashSigAlgo buffer */
|
||||
InitSuitesHashSigAlgo_ex2(NULL, haveSig, 1, ssl->buffers.keySz,
|
||||
InitSuitesHashSigAlgo(NULL, haveSig, 1, ssl->buffers.keySz,
|
||||
&hashSigAlgoSz);
|
||||
sa = TLSX_SignatureAlgorithms_New(ssl, hashSigAlgoSz, ssl->heap);
|
||||
if (sa == NULL)
|
||||
return MEMORY_ERROR;
|
||||
InitSuitesHashSigAlgo_ex2(sa->hashSigAlgo, haveSig, 1, ssl->buffers.keySz,
|
||||
InitSuitesHashSigAlgo(sa->hashSigAlgo, haveSig, 1, ssl->buffers.keySz,
|
||||
&hashSigAlgoSz);
|
||||
ret = TLSX_Push(&ssl->extensions, TLSX_SIGNATURE_ALGORITHMS, sa, ssl->heap);
|
||||
if (ret != 0) {
|
||||
|
@@ -47112,7 +47112,7 @@ static int test_wolfSSL_sigalg_info(void)
|
||||
word16 idx = 0;
|
||||
int allSigAlgs = SIG_ECDSA | SIG_RSA | SIG_SM2 | SIG_FALCON | SIG_DILITHIUM;
|
||||
|
||||
InitSuitesHashSigAlgo_ex2(hashSigAlgo, allSigAlgs, 1, 0xFFFFFFFF, &len);
|
||||
InitSuitesHashSigAlgo(hashSigAlgo, allSigAlgs, 1, 0xFFFFFFFF, &len);
|
||||
for (idx = 0; idx < len; idx += 2) {
|
||||
int hashAlgo = 0;
|
||||
int sigAlgo = 0;
|
||||
@@ -47124,7 +47124,7 @@ static int test_wolfSSL_sigalg_info(void)
|
||||
ExpectIntNE(sigAlgo, 0);
|
||||
}
|
||||
|
||||
InitSuitesHashSigAlgo_ex2(hashSigAlgo, allSigAlgs | SIG_ANON, 1,
|
||||
InitSuitesHashSigAlgo(hashSigAlgo, allSigAlgs | SIG_ANON, 1,
|
||||
0xFFFFFFFF, &len);
|
||||
for (idx = 0; idx < len; idx += 2) {
|
||||
int hashAlgo = 0;
|
||||
|
@@ -2355,16 +2355,8 @@ typedef struct CipherSuite {
|
||||
#endif
|
||||
} CipherSuite;
|
||||
|
||||
WOLFSSL_LOCAL void InitSuitesHashSigAlgo(Suites* suites, int haveECDSAsig,
|
||||
int haveRSAsig, int haveFalconSig,
|
||||
int haveDilithiumSig, int haveAnon,
|
||||
int tls1_2, int keySz);
|
||||
WOLFSSL_LOCAL void InitSuitesHashSigAlgo_ex(byte* hashSigAlgo, int haveECDSAsig,
|
||||
int haveRSAsig, int haveFalconSig,
|
||||
int haveDilithiumSig, int haveAnon,
|
||||
int tls1_2, int keySz, word16* len);
|
||||
/* use wolfSSL_API visibility to be able to test in tests/api.c */
|
||||
WOLFSSL_API void InitSuitesHashSigAlgo_ex2(byte* hashSigAlgo, int have,
|
||||
WOLFSSL_API void InitSuitesHashSigAlgo(byte* hashSigAlgo, int have,
|
||||
int tls1_2, int keySz,
|
||||
word16* len);
|
||||
WOLFSSL_LOCAL int AllocateCtxSuites(WOLFSSL_CTX* ctx);
|
||||
@@ -4040,7 +4032,7 @@ enum KeyExchangeAlgorithm {
|
||||
ecc_static_diffie_hellman_kea /* for verify suite only */
|
||||
};
|
||||
|
||||
/* Used with InitSuitesHashSigAlgo_ex2 */
|
||||
/* Used with InitSuitesHashSigAlgo */
|
||||
#define SIG_ECDSA 0x01
|
||||
#define SIG_RSA 0x02
|
||||
#define SIG_SM2 0x04
|
||||
|
Reference in New Issue
Block a user