0

How do I create a new keystore file with wsadmin tool in websphere.

I tried this command

AdminTask.createKeyStore('-keyStoreName <someName> 
                        -keyStoreType PKCS12 
                        -keyStoreLocation <some file location.p12> 
                        -keyStorePassword <pwd> 
                        -keyStorePasswordVerify <pwd>'
                         )

but looks like it just loads the keystore in the given location. but i want to create a new keystore and store it in the given location.

What command should I use for that?

Thanks.

user2070649
  • 103
  • 1
  • 10

1 Answers1

1

What do you mean it 'loads keystore'?

I've used the following command:

AdminTask.createKeyStore('[-keyStoreName testKS -keyStoreType PKCS12
   -keyStoreLocation c:/testKeyFile.p12 -keyStorePassword testpwd 
   -keyStorePasswordVerify testpwd -keyStoreIsFileBased true
   -keyStoreInitAtStartup true -keyStoreReadOnly false]')

and I see keystore correctly created in the file system, and also visible via admin console.

Remember to call AdminConfig.save() afterwards to save changes.

See details here KeyStoreCommands command group for the AdminTask object

Gas
  • 17,601
  • 4
  • 46
  • 93