This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
commit e3bc27d85e39971b86f31806d32b3ce24176b8fc Author: Mark Thomas <[email protected]> AuthorDate: Fri Dec 12 09:26:13 2025 +0000 Remove use of deprecated code Remove method for which there is no equivalent Java method --- native/src/sslcontext.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c index 115b4a521..e026cc11a 100644 --- a/native/src/sslcontext.c +++ b/native/src/sslcontext.c @@ -753,50 +753,6 @@ cleanup: return rv; } -TCN_IMPLEMENT_CALL(void, SSLContext, setTmpECDHByCurveName)(TCN_STDARGS, jlong ctx, - jstring curveName) -{ -#ifdef HAVE_ECC - tcn_ssl_ctxt_t *c = J2P(ctx, tcn_ssl_ctxt_t *); - int i; - EC_KEY *ecdh; - TCN_ALLOC_CSTRING(curveName); - UNREFERENCED(o); - TCN_ASSERT(ctx != 0); - TCN_ASSERT(curveName); - - /* First try to get curve by name */ - i = OBJ_sn2nid(J2S(curveName)); - if (!i) { - tcn_Throw(e, "Can't configure elliptic curve: unknown curve name %s", J2S(curveName)); - TCN_FREE_CSTRING(curveName); - return; - } - - ecdh = EC_KEY_new_by_curve_name(i); - if (!ecdh) { - tcn_Throw(e, "Can't configure elliptic curve: unknown curve name %s", J2S(curveName)); - TCN_FREE_CSTRING(curveName); - return; - } - - /* Setting found curve to context */ - if (1 != SSL_CTX_set_tmp_ecdh(c->ctx, ecdh)) { - char err[TCN_OPENSSL_ERROR_STRING_LENGTH]; - EC_KEY_free(ecdh); - ERR_error_string_n(SSL_ERR_get(), err, TCN_OPENSSL_ERROR_STRING_LENGTH); - tcn_Throw(e, "Error while configuring elliptic curve %s: %s", J2S(curveName), err); - TCN_FREE_CSTRING(curveName); - return; - } - EC_KEY_free(ecdh); - TCN_FREE_CSTRING(curveName); -#else - tcn_Throw(e, "Cant't configure elliptic curve: unsupported by this OpenSSL version"); - return; -#endif -} - TCN_IMPLEMENT_CALL(void, SSLContext, setShutdownType)(TCN_STDARGS, jlong ctx, jint type) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
