From 17b873a3454fa89899a57ee941e4a53f521c5439 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 18 Nov 2022 10:43:39 +0800 Subject: [PATCH] x509: Reallow duplicate attributes in CSRs. --- smx509/x509_additional_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smx509/x509_additional_test.go b/smx509/x509_additional_test.go index 5305d72..7b35a4a 100644 --- a/smx509/x509_additional_test.go +++ b/smx509/x509_additional_test.go @@ -158,8 +158,8 @@ func TestCreateSM2CertificateRequest(t *testing.T) { func TestParseAliCertificateRequest(t *testing.T) { err := parseAndCheckCsr([]byte(csrFromAli)) - if err == nil { - t.Fatal("ParseCertificate should fail when parsing certificate with duplicate extensions") + if err != nil { + t.Fatal("ParseCertificateRequest should succeed when parsing CSR with duplicate attributes") } }