From c7a0987971ca651d4eb5a507cd6acf26a05319b5 Mon Sep 17 00:00:00 2001 From: Matthew McPherrin Date: Wed, 10 Jan 2024 13:38:02 -0500 Subject: [PATCH] Use asn1.TagOctetString constant (#7247) We require a Go version newer than 1.6, so we can use the constant. --- pkcs11helpers/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkcs11helpers/helpers.go b/pkcs11helpers/helpers.go index 04b88fe2f..173123e17 100644 --- a/pkcs11helpers/helpers.go +++ b/pkcs11helpers/helpers.go @@ -80,7 +80,7 @@ func (s *Session) getPublicKeyID(label string, publicKey crypto.PublicKey) ([]by // PKCS#11 v2.20 specified that the CKA_EC_POINT was to be store in a DER-encoded // OCTET STRING. rawValue := asn1.RawValue{ - Tag: 4, // in Go 1.6+ this is asn1.TagOctetString + Tag: asn1.TagOctetString, Bytes: elliptic.Marshal(key.Curve, key.X, key.Y), } marshalledPoint, err := asn1.Marshal(rawValue)