[Core] Create x509v3 certificates

This commit is contained in:
Philipp Hancke 2020-09-08 21:42:38 +02:00 committed by GitHub
parent b21eef3859
commit 7bd59f6440
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ static int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int days
rsa = NULL;
X509_set_version(x, 0);
X509_set_version(x, 2);
ASN1_INTEGER_set(X509_get_serialNumber(x), serial);
X509_gmtime_adj(X509_get_notBefore(x), -(long)60*60*24*7);
X509_gmtime_adj(X509_get_notAfter(x), (long)60*60*24*days);