Skip to content

Commit

Permalink
Fix the build warning under OPENSSL_NO_GOST
Browse files Browse the repository at this point in the history
Variable 'pktype' was set but not used under OPENSSL_NO_GOST. This change
will fix the build warning under [-Werror=unused-but-set-variable].

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from #2961)
  • Loading branch information
Qin Long authored and levitte committed Mar 29, 2017
1 parent cff55b9 commit dc8da7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssl/statem/statem_lib.c
Expand Up @@ -281,7 +281,7 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
unsigned char *gost_data = NULL;
#endif
int al = SSL_AD_INTERNAL_ERROR, ret = MSG_PROCESS_ERROR;
int type = 0, j, pktype;
int type = 0, j;
unsigned int len;
X509 *peer;
const EVP_MD *md = NULL;
Expand All @@ -303,7 +303,6 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
goto f_err;
}

pktype = EVP_PKEY_id(pkey);
type = X509_certificate_type(peer, pkey);

if (!(type & EVP_PKT_SIGN)) {
Expand Down Expand Up @@ -384,6 +383,7 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
}
#ifndef OPENSSL_NO_GOST
{
int pktype = EVP_PKEY_id(pkey);
if (pktype == NID_id_GostR3410_2001
|| pktype == NID_id_GostR3410_2012_256
|| pktype == NID_id_GostR3410_2012_512) {
Expand Down

0 comments on commit dc8da7b

Please sign in to comment.