From 0475638ab90ec518ee7fcd567ad2beb1f8523020 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Sat, 22 Jun 2019 00:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=AD=BE=E5=8F=91=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E6=97=B6=EF=BC=8C=E5=AF=86=E9=92=A5=E7=94=A8=E6=B3=95?= =?UTF-8?q?=E4=B8=8Dcopy=E5=8E=9F=E8=AF=81=E4=B9=A6=E3=80=82https://git.me?= =?UTF-8?q?salab.cn/tango/certstore/issues/8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/ssl_utils.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/src/ssl_utils.cpp b/platform/src/ssl_utils.cpp index 51dc169..280fdac 100644 --- a/platform/src/ssl_utils.cpp +++ b/platform/src/ssl_utils.cpp @@ -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;