DemoIdentity
DemoIdentity creation
Error :
can not create cerGen
---------------------
solution
Execute the below commands
cd WLS_home/user_projects/domains/mydomain/bin/
. ./setDomainEnv.sh
-------------------------
certGen creation directory
/apps/weblogic/wlserver/server/bin
-------------------------
execute this below command
java utils.CertGen -cn inddlvtwlmas01.weblogic.net -keyfilepass DemoIdentityPassPhrase -certfile testcert -keyfile testkey
----------------------------
error :
Failed to generate the certificate:
----------------------------------
java.security.InvalidKeyException: exponent is larger than modulus
Make sure the CA files are in DER format.
solution
------------
execute the below command
java utils.CertGen -cn inddlvtwlmas01.weblogic.net -keyfilepass DemoIdentityPassPhrase -certfile testcert -keyfile testkey -noskid
step 2 import
---------------
java utils.ImportPrivateKey newkeystore.jks DemoIdentityKeyStorePassPhrase demoidentity DemoIdentityPassPhrase testcert.pem testkey.pem
problem occurs.
after setting domain environment then is it is executed
cd WLS_home/user_projects/domains/mydomain/bin/
. ./setDomainEnv.sh
-----------------------------------------------------------
java utils.ImportPrivateKey newkeystore.jks DemoIdentityKeyStorePassPhrase demoidentity DemoIdentityPassPhrase testcert.pem testkey.pem
----------------
output
-----------------
<Dec 17, 2018 12:01:00 AM EST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
<Dec 17, 2018 12:01:02 AM EST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
Imported private key testkey.pem and certificate testcert.pem
into a new keystore newkeystore.jks of type jks under alias demoidentity
-----------------
Now check if your public key/certifcate is imported in the new key store.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
keytool -v -list -keystore newkeystore.jks -storepass DemoIdentityKeyStorePassPhrase
output
-----------------------------
DemoIdentityKeyStorePassPhrase
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: demoidentity
Creation date: Dec 17, 2018
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=inddlvtwlmas01.weblogic.net, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
Issuer: CN=CertGenCA, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
Serial number: 61e58c56c668bae59b67551fe816219f
Valid from: Sat Dec 15 23:23:30 EST 2018 until: Fri Dec 16 23:23:30 EST 2033
Certificate fingerprints:
MD5: CE:24:B8:21:19:8F:E4:CF:61:16:6A:7E:56:A6:5D:49
SHA1: 9C:17:54:61:75:C0:DD:E2:E9:FF:33:1E:62:5E:04:FA:81:B5:39:19
SHA256: AF:93:B3:36:B5:5F:1F:2E:C5:1C:DD:84:71:DB:73:E0:C1:AA:AF:71:B0:E9:4B:92:AA:A1:70:E0:5C:34:A7:0A
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
Extensions:
#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 34 38 FD 45 D8 80 CF C7 D2 E8 DF 1D F8 A1 39 B0 48.E..........9.
0010: 11 88 00 6A ...j
]
]
*******************************************
*******************************************
--------------------------------------------------------------------------------------------------------------
find keystore
---------------------
ls *.jks
newkeystore.jks
-----------------------
This newkeystore.jks is your new DemoIdentity.jks
rename as DemoIdentity.jks
----------------------------
cp newkeystore.jks DemoIdentity.jks
find . -name Demo*.jks
output
./DemoIdentity.jks
Comments
Post a Comment