本地签发证书时,密钥用法不copy原证书。https://git.mesalab.cn/tango/certstore/issues/8
This commit is contained in:
@@ -666,12 +666,10 @@ X509 * ssl_x509_forge(X509 * cacrt, EVP_PKEY * cakey, X509 * origcrt, EVP_PKEY *
|
||||
if (rv == -1)
|
||||
goto errout;
|
||||
|
||||
rv = ssl_x509_v3ext_copy_by_nid(crt, origcrt,
|
||||
NID_key_usage);
|
||||
if (rv == 0)
|
||||
rv = ssl_x509_v3ext_add(&ctx, crt, "keyUsage",
|
||||
"digitalSignature,"
|
||||
"keyEncipherment");
|
||||
//Not copy keyUsage, because RSA is not compatibel with "Key Agreement".
|
||||
rv = ssl_x509_v3ext_add(&ctx, crt, "keyUsage",
|
||||
"digitalSignature,"
|
||||
"keyEncipherment");
|
||||
if (rv == -1)
|
||||
goto errout;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user