diff --git a/cfca/pkcs10_test.go b/cfca/pkcs10_test.go index 32563e5..35686cf 100644 --- a/cfca/pkcs10_test.go +++ b/cfca/pkcs10_test.go @@ -37,23 +37,23 @@ func TestCreateCertificateRequest(t *testing.T) { Country: []string{"CN"}, }, } - _, err = smx509.CreateCFCACertificateRequest(random, template, "", "", "") + _, err = CreateCertificateRequest(random, template, "", "", "") if err == nil || err.Error() != "x509: certificate private key does not implement crypto.Signer" { t.Fatal("certificate private key does not implement crypto.Signer") } - _, err = smx509.CreateCFCACertificateRequest(random, template, certKey, "", "") + _, err = CreateCertificateRequest(random, template, certKey, "", "") if err == nil || err.Error() != "x509: tmp private key does not implement crypto.Signer" { t.Fatal("tmp private key does not implement crypto.Signer") } - _, err = smx509.CreateCFCACertificateRequest(random, template, certKey, invalidTmpKey, "") + _, err = CreateCertificateRequest(random, template, certKey, invalidTmpKey, "") if err == nil || err.Error() != "x509: only SM2 public key is supported" { t.Fatal("only SM2 public key is supported") } - _, err = smx509.CreateCFCACertificateRequest(random, template, certKey, tmpKey, "") + _, err = CreateCertificateRequest(random, template, certKey, tmpKey, "") if err == nil || err.Error() != "x509: challenge password is required" { t.Fatal("challenge password is required") } - csrDer, err := smx509.CreateCFCACertificateRequest(random, template, certKey, tmpKey, "111111") + csrDer, err := CreateCertificateRequest(random, template, certKey, tmpKey, "111111") if err != nil { t.Fatal(err) }