diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index a7d0bc45a..ecdd932c8 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -1618,8 +1618,10 @@ static int GetName(DecodedCert* cert, int nameType) #ifdef HAVE_PKCS7 /* store pointer to raw issuer */ - cert->issuerRaw = &cert->source[cert->srcIdx]; - cert->issuerRawLen = length - cert->srcIdx; + if (nameType == ISSUER) { + cert->issuerRaw = &cert->source[cert->srcIdx]; + cert->issuerRawLen = length - cert->srcIdx; + } #endif while (cert->srcIdx < (word32)length) {