]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TLS: Move variable declaration to the beginning of the block
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 22 Dec 2015 22:01:25 +0000 (00:01 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 23 Dec 2015 22:54:30 +0000 (00:54 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/tls/x509v3.c

index 5521390ad3495eb8af94ec6c690e80e7bf4cbcf9..55555254ea41af1be116677bd757137c6a8f03ec 100644 (file)
@@ -1339,6 +1339,7 @@ static int x509_parse_tbs_certificate(const u8 *buf, size_t len,
        size_t left;
        char sbuf[128];
        unsigned long value;
+       const u8 *subject_dn;
 
        /* tbsCertificate TBSCertificate ::= SEQUENCE */
        if (asn1_get_next(buf, len, &hdr) < 0 ||
@@ -1436,7 +1437,6 @@ static int x509_parse_tbs_certificate(const u8 *buf, size_t len,
                return -1;
 
        /* subject Name */
-       const u8 *subject_dn;
        subject_dn = pos;
        if (x509_parse_name(pos, end - pos, &cert->subject, &pos))
                return -1;