Addressed peer feedback, avoid double check when HAVE_CURVE25519 not set

This commit is contained in:
kaleb-himes
2019-06-21 09:40:17 -06:00
parent 49a631996c
commit c114bcaead

View File

@@ -16533,9 +16533,8 @@ 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
@@ -16546,7 +16545,6 @@ const char* wolfSSL_get_curve_name(WOLFSSL* ssl)
NULL)); NULL));
} }
#endif #endif
}
return cName; return cName;
} }