Skip to content

Commit

Permalink
Use magic number for X509_VERSION_1
Browse files Browse the repository at this point in the history
OpenSSL 1.x does not support using X509_VERSION_1

Signed-off-by: Stephen Gallagher <[email protected]>
  • Loading branch information
sgallagher committed Oct 19, 2024
1 parent b63dd4d commit 8b096dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ sscg_x509v3_csr_new (TALLOC_CTX *mem_ctx,

talloc_set_destructor ((TALLOC_CTX *)csr, _sscg_csr_destructor);

/* We will generate only x509v3 certificates */
sslret = X509_REQ_set_version (csr->x509_req, X509_VERSION_1);
/* All CSRs are v1 */
sslret = X509_REQ_set_version (csr->x509_req, 0);
CHECK_SSL (sslret, X509_REQ_set_version);

subject = X509_REQ_get_subject_name (csr->x509_req);
Expand Down

0 comments on commit 8b096dc

Please sign in to comment.