From 6a75c29d236954e4d6602f2dd9b4021e67ce342b Mon Sep 17 00:00:00 2001 From: nzbr Date: Wed, 27 Mar 2024 16:38:03 +0100 Subject: [PATCH] fix: replace usage of ParseSubjectStringToRawDerBytes Signed-off-by: nzbr --- pkg/requestgen/generator.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/requestgen/generator.go b/pkg/requestgen/generator.go index 779c8ffb..e55dfb33 100644 --- a/pkg/requestgen/generator.go +++ b/pkg/requestgen/generator.go @@ -64,7 +64,11 @@ func RequestForMetadata(meta metadata.Metadata) (*manager.CertificateRequestBund if err != nil { return nil, fmt.Errorf("%q: %w", csiapi.LiteralSubjectKey, err) } - request.RawSubject, err = cmpki.ParseSubjectStringToRawDerBytes(lSubjStr) + rdnSequence, err := cmpki.UnmarshalSubjectStringToRDNSequence(lSubjStr) + if err != nil { + return nil, fmt.Errorf("%q: %w", csiapi.LiteralSubjectKey, err) + } + request.RawSubject, err = cmpki.MarshalRDNSequenceToRawDERBytes(rdnSequence) if err != nil { return nil, fmt.Errorf("%q: %w", csiapi.LiteralSubjectKey, err) }