From 4b21cc617b638cccb71a27db3241375bc3d9761a Mon Sep 17 00:00:00 2001 From: theexiile1305 Date: Thu, 17 Oct 2024 16:14:04 +0200 Subject: [PATCH] fix: tests --- dummy-child-cert-ecdsa.pem => dummy-chain-cert-ecdsa.pem | 0 ...cert-ecdsa.pem.license => dummy-chain-cert-ecdsa.pem.license | 0 msg_test.go | 2 +- util_test.go | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename dummy-child-cert-ecdsa.pem => dummy-chain-cert-ecdsa.pem (100%) rename dummy-child-cert-ecdsa.pem.license => dummy-chain-cert-ecdsa.pem.license (100%) diff --git a/dummy-child-cert-ecdsa.pem b/dummy-chain-cert-ecdsa.pem similarity index 100% rename from dummy-child-cert-ecdsa.pem rename to dummy-chain-cert-ecdsa.pem diff --git a/dummy-child-cert-ecdsa.pem.license b/dummy-chain-cert-ecdsa.pem.license similarity index 100% rename from dummy-child-cert-ecdsa.pem.license rename to dummy-chain-cert-ecdsa.pem.license diff --git a/msg_test.go b/msg_test.go index 2aeab91..aa46f94 100644 --- a/msg_test.go +++ b/msg_test.go @@ -3371,7 +3371,7 @@ func TestSignWithSMime_ValidECDSAKeyPair(t *testing.T) { if err := m.SignWithSMimeECDSA(privateKey, certificate, intermediateCertificate); err != nil { t.Errorf("failed to set sMime. Cause: %v", err) } - if m.sMime.privateKey.rsa == nil { + if m.sMime.privateKey.ecdsa == nil { t.Errorf("WithSMimeSinging() - no private key is given") } if m.sMime.certificate == nil { diff --git a/util_test.go b/util_test.go index 17821aa..7640f62 100644 --- a/util_test.go +++ b/util_test.go @@ -16,7 +16,7 @@ const ( keyRSAFilePath = "dummy-child-key-rsa.pem" certECDSAFilePath = "dummy-chain-cert-ecdsa.pem" - keyECDSAFilePath = "dummy-child-cert-ecdsa.pem" + keyECDSAFilePath = "dummy-child-key-ecdsa.pem" ) // getDummyRSACryptoMaterial loads a certificate (RSA) and the associated private key (ECDSA) form local disk for testing purposes