X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fx509%2Ft_req.c;fp=crypto%2Fx509%2Ft_req.c;h=095c16510099922c2ed94bf2344ca965d9367d2c;hp=29479b08860c540ff565e01d0df98e0a2e27544c;hb=cdf63a3736a91a534bd3bc952b1dc3ef714604dd;hpb=d97adfda2868aeb9e62df96216203e8120a95d6d diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c index 29479b0886..095c165100 100644 --- a/crypto/x509/t_req.c +++ b/crypto/x509/t_req.c @@ -60,7 +60,7 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, } if (!(cflag & X509_FLAG_NO_VERSION)) { l = X509_REQ_get_version(x); - if (l >= 0 && l <= 2) { + if (l == X509_REQ_VERSION_1) { if (BIO_printf(bp, "%8sVersion: %ld (0x%lx)\n", "", l + 1, (unsigned long)l) <= 0) goto err; } else {