@@ -253,23 +253,16 @@ func getPublicKeyFromPKCS12(keyStorePath string, keyStorePassword []byte, keySto
253253 }
254254
255255 // Decode PKCS12 data using the improved go-pkcs12 library
256- privateKey , certificate , caCerts , err := pkcs12 .DecodeChain (p12Data , string (keyStorePassword ))
256+ privateKey , certificate , _ , err := pkcs12 .DecodeChain (p12Data , string (keyStorePassword ))
257257 if err != nil {
258258 // Try with alias-specific password if main password fails
259259 keyPassword , _ := base64 .StdEncoding .DecodeString (keyStoreConfig .KeyPassword )
260- privateKey , certificate , caCerts , err = pkcs12 .DecodeChain (p12Data , string (keyPassword ))
260+ privateKey , certificate , _ , err = pkcs12 .DecodeChain (p12Data , string (keyPassword ))
261261 if err != nil {
262262 return nil , errors .New ("Decoding PKCS12 keystore: " + err .Error ())
263263 }
264264 }
265265
266- // Handle case where we need to find a specific alias
267- if keyStoreConfig .KeyAlias != "" {
268- // For PKCS12 with aliases, we might need additional logic
269- // For now, we'll use the decoded certificate and key
270- _ = caCerts // Keep for potential future use
271- }
272-
273266 // Extract RSA private key
274267 var rsaKey * rsa.PrivateKey
275268 switch key := privateKey .(type ) {
0 commit comments