summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c7497f3)
Make X509_REQ_print_ex do the same thing that
X509_REQ_print does.
Reviewed-by: Matt Caswell <matt@openssl.org>
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long cflag)
{
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long cflag)
{
int i;
const char *neg;
X509_REQ_INFO *ri;
int i;
const char *neg;
X509_REQ_INFO *ri;
}
if(!(cflag & X509_FLAG_NO_VERSION))
{
}
if(!(cflag & X509_FLAG_NO_VERSION))
{
- neg=(ri->version->type == V_ASN1_NEG_INTEGER)?"-":"";
- l=0;
- for (i=0; i<ri->version->length; i++)
- { l<<=8; l+=ri->version->data[i]; }
- if(BIO_printf(bp,"%8sVersion: %s%lu (%s0x%lx)\n","",neg,l,neg,
- l) <= 0)
+ l = X509_REQ_get_version(x);
+ if(BIO_printf(bp,"%8sVersion: %ld (0x%lx)\n","",l+1, l) <= 0)
goto err;
}
if(!(cflag & X509_FLAG_NO_SUBJECT))
goto err;
}
if(!(cflag & X509_FLAG_NO_SUBJECT))