X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs3_lib.c;h=c08065f0357be6a367b910562d519903cd8751bc;hp=b6a73b9144de50af23a1f40745e6a27491290004;hb=73cd6175b970fa63c9c70d769febd91f3c7b5cdd;hpb=a76ba82ccbfee6df5aa86ba2a275b713f3e0f239 diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index b6a73b9144..c08065f035 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -4250,16 +4250,14 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp) (void)) long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) { - CERT *cert; - - cert = ctx->cert; - switch (cmd) { #ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH: { DH *new = NULL, *dh; + CERT *cert; + cert = ctx->cert; dh = (DH *)parg; if (!ssl_ctx_security(ctx, SSL_SECOP_TMP_DH, DH_security_bits(dh), 0, dh)) { @@ -4464,15 +4462,11 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void)) { - CERT *cert; - - cert = ctx->cert; - switch (cmd) { #ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH_CB: { - cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp; + ctx->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp; } break; #endif