Convert PEM (Base64 DER) key pair into PFX (PKCS12)
C:\>openssl pkcs12 -export -in ca.cer -inkey ca.pem -out ca.pfx
Loading 'screen' into random state - done
Enter pass phrase for ca.pem:
Enter Export Password:
Verifying - Enter Export Password:
签名试一下
C:\>signtool sign /f ca.pfx /p password test.js
Done Adding Additional Store
Successfully signed: test.js
导入到JKS格式试一下
C:\Temp>keytool -importkeystore -srckeystore ca.pfx -srcstoretype PKCS12 -destkeystore ca.jks
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
Entry for alias 1 successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled
没有评论:
发表评论