From d8e412f8198a646922495bbed5296be52533bddd Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 10 Apr 2024 12:48:51 +0300 Subject: [PATCH] handle rsaEncryption algorithm case --- internal/service/api/handlers/create_identity.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/service/api/handlers/create_identity.go b/internal/service/api/handlers/create_identity.go index d43050f..075dbab 100644 --- a/internal/service/api/handlers/create_identity.go +++ b/internal/service/api/handlers/create_identity.go @@ -318,6 +318,10 @@ func validateSignedAttributes(signedAttributes, encapsulatedContent []byte, algo } func signatureAlgorithm(passedAlgorithm string) string { + if passedAlgorithm == "rsaEncryption" { + return SHA256withRSA + } + if strings.Contains(strings.ToUpper(passedAlgorithm), "PSS") { return "" // RSA-PSS is not currently supported }