Skip to content

Commit

Permalink
fix: replace usage of ParseSubjectStringToRawDerBytes
Browse files Browse the repository at this point in the history
Signed-off-by: nzbr <[email protected]>
  • Loading branch information
nzbr committed Apr 2, 2024
1 parent 8e97999 commit 6a75c29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/requestgen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6a75c29

Please sign in to comment.