Browse Source

Omit version for v1 certificates.

When calling X509_set_version to set v1 certificate, that should mean
that the version number field is omitted.

(Imported from upstream's 8c0d19d857)

Change-Id: If433fda7b6ccbd899f3379a38581c351cf4a82da
kris/onging/CECPQ3_patch15
Adam Langley 10 years ago
parent
commit
fba236fa88
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      crypto/x509/x509_set.c

+ 6
- 0
crypto/x509/x509_set.c View File

@@ -64,6 +64,12 @@
int X509_set_version(X509 *x, long version)
{
if (x == NULL) return(0);
if (version == 0)
{
M_ASN1_INTEGER_free(x->cert_info->version);
x->cert_info->version = NULL;
return(1);
}
if (x->cert_info->version == NULL)
{
if ((x->cert_info->version=M_ASN1_INTEGER_new()) == NULL)


Loading…
Cancel
Save