Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit e06a230

Browse files
committed
Workaround for different keys
Signed-off-by: Andy Lo-A-Foe <andy.loafoe@gmail.com>
1 parent fff2213 commit e06a230

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

iron/encrypt.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ func parsePublicKey(pubkey []byte) (key *rsa.PublicKey, err error) {
106106

107107
rsaKey, err := x509.ParsePKIXPublicKey(rsablock.Bytes)
108108
if err != nil {
109-
return nil, err
109+
rsaKey, err = x509.ParsePKCS1PublicKey(rsablock.Bytes)
110+
if err != nil {
111+
return nil, err
112+
}
110113
}
111114
rsaPublicKey, ok := rsaKey.(*rsa.PublicKey)
112115
if !ok {

0 commit comments

Comments
 (0)