Skip to content

Commit e3bc27d

Browse files
committed
Remove use of deprecated code
Remove method for which there is no equivalent Java method
1 parent 0d4a129 commit e3bc27d

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

native/src/sslcontext.c

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -753,50 +753,6 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCACertificate)(TCN_STDARGS,
753753
return rv;
754754
}
755755

756-
TCN_IMPLEMENT_CALL(void, SSLContext, setTmpECDHByCurveName)(TCN_STDARGS, jlong ctx,
757-
jstring curveName)
758-
{
759-
#ifdef HAVE_ECC
760-
tcn_ssl_ctxt_t *c = J2P(ctx, tcn_ssl_ctxt_t *);
761-
int i;
762-
EC_KEY *ecdh;
763-
TCN_ALLOC_CSTRING(curveName);
764-
UNREFERENCED(o);
765-
TCN_ASSERT(ctx != 0);
766-
TCN_ASSERT(curveName);
767-
768-
/* First try to get curve by name */
769-
i = OBJ_sn2nid(J2S(curveName));
770-
if (!i) {
771-
tcn_Throw(e, "Can't configure elliptic curve: unknown curve name %s", J2S(curveName));
772-
TCN_FREE_CSTRING(curveName);
773-
return;
774-
}
775-
776-
ecdh = EC_KEY_new_by_curve_name(i);
777-
if (!ecdh) {
778-
tcn_Throw(e, "Can't configure elliptic curve: unknown curve name %s", J2S(curveName));
779-
TCN_FREE_CSTRING(curveName);
780-
return;
781-
}
782-
783-
/* Setting found curve to context */
784-
if (1 != SSL_CTX_set_tmp_ecdh(c->ctx, ecdh)) {
785-
char err[TCN_OPENSSL_ERROR_STRING_LENGTH];
786-
EC_KEY_free(ecdh);
787-
ERR_error_string_n(SSL_ERR_get(), err, TCN_OPENSSL_ERROR_STRING_LENGTH);
788-
tcn_Throw(e, "Error while configuring elliptic curve %s: %s", J2S(curveName), err);
789-
TCN_FREE_CSTRING(curveName);
790-
return;
791-
}
792-
EC_KEY_free(ecdh);
793-
TCN_FREE_CSTRING(curveName);
794-
#else
795-
tcn_Throw(e, "Cant't configure elliptic curve: unsupported by this OpenSSL version");
796-
return;
797-
#endif
798-
}
799-
800756
TCN_IMPLEMENT_CALL(void, SSLContext, setShutdownType)(TCN_STDARGS, jlong ctx,
801757
jint type)
802758
{

0 commit comments

Comments
 (0)