本主题中所讨论的 commandLine 实用程序用于从 PGP/GPG 密钥库中的安全和公共环文件中抽取专用和公用密钥。
要从 PGP/GPG 密钥库中抽取密钥,commandLine 实用程序需要使用以下参数:
extractPKCS12AndPublicKey.bat -privateKeyRingFile <file name of the secret key ring file> -publicKeyRingFileName <file name of the pub key ring file> -passphrase <password for the gpg keys> -keyStoreLocation <keyStore Location> -keyStorePassword <keystore password> -privateCertificateName <private certificate name> -issuerName <name of the certificate issuer> -certificateStartDate <start date> -certificateExpiryDate <end date> -algorithmName SHA256withRSA
extractPKCS12AndPublicKey.bat -privateKeyRingFile C:\Users\IBM_ADMIN\Documents\gpg\secring.gpg -publicKeyRingFile C:\Users\IBM_ADMIN\Documents\gpg\pubring.gpg -passphrase castiron -keyStoreLocation C:\mykeystore.p12 -keyStorePassword changeit -privateCertificateName myKey -issuerName "C=US, ST=CA, L=Mountain View, O=Cast Iron Systems, CN=Cast Iron Appliance VMWSULXJE23SK6HO" -certificateStartDate 01-01-2013 -certificateExpiryDate 01-01-2015 -algorithm SHA256withRSA
importPKCS12IntoJKS.bat -privateCertificateName <private certificate name> -pkcsKeyStoreLocation < PKCS12 keystore store that we created in step1 > -pkcsKeyStorePassword < password for the keystore>
importPKCS12IntoJKS.bat -privateCertificateName myKey -pkcsKeyStoreLocation C:mykeystore.p12 -pkcsKeyStorePassword changeit