0

I have one old certificate and one new certificate in my keystore hence i want to remove the old cert by using the wsadmin script and also import the new one using wsadmin script.

i have listed the cert using this command -

Command to List certs - AdminTask.listPersonalCertificate('[-keystorename <test_store> -keystorescope <test_scope>')

i received complete output and also i want to compare the certs using the validity so that i will remove the old cert only.

Thanks

Rancho
  • 15
  • 5

1 Answers1

0

Typically you would use the admin console, with command assistance turned on, to perform the operation you wish to script, then examine the output of command assistance. Just note, not all admin console operations go through a scriptable path, in that case, you'll need to look at the security mbean operations for examples.

F Rowe
  • 2,042
  • 1
  • 11
  • 12
  • Thank you for the answer, we do have some commands for import the certs like - AdminTask.importCertificate('[-keyFilePath ks_file_path -keyFilePassword ks_pass -keyFileType ks_file_type -certificateAliasFromKeyFile alias_from_ks -keyStoreName ks_name -keyStoreScope (cell):appserver_was_cell:(node):appserver_was_node]') AdminConfig.save() but i want to compare the validity so i can delete the correct cert. and replace the right one. these task can easily happens from console but looking from wsadmin or jython scripting option. – Rancho Nov 22 '20 at 06:29
  • The title of post asked a specific question, so I answered that... If you want to determine validity, you just need to write some python to parse the output of the listPersonalCertificate admin task. – F Rowe Nov 23 '20 at 14:20