mirror of https://github.com/wolfSSL/wolfssl.git
Addressed peer feedback, avoid double check when HAVE_CURVE25519 not set
parent
49a631996c
commit
c114bcaead
16
src/ssl.c
16
src/ssl.c
|
@ -16533,20 +16533,18 @@ const char* wolfSSL_get_curve_name(WOLFSSL* ssl)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cName == NULL) {
|
|
||||||
#ifdef HAVE_CURVE25519
|
#ifdef HAVE_CURVE25519
|
||||||
if (ssl->ecdhCurveOID == ECC_X25519_OID) {
|
if (ssl->ecdhCurveOID == ECC_X25519_OID && cName == NULL) {
|
||||||
cName = "X25519";
|
cName = "X25519";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
if (ssl->ecdhCurveOID != 0 && cName == NULL) {
|
if (ssl->ecdhCurveOID != 0 && cName == NULL) {
|
||||||
cName = wc_ecc_get_name(wc_ecc_get_oid(ssl->ecdhCurveOID, NULL,
|
cName = wc_ecc_get_name(wc_ecc_get_oid(ssl->ecdhCurveOID, NULL,
|
||||||
NULL));
|
NULL));
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return cName;
|
return cName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue