PersonalCertificateCommands command group for the AdminTask object
You can use the Jython or Jacl scripting languages to configure security with the wsadmin tool. The commands and parameters in the PersonalCertificateCommands group can be used to create and manage personal or signer certificates. The PersonalCertificateCommands command group for the AdminTask object includes the following commands:
- createSelfSignedCertificate
- deleteCertificate
- exportCertificate
- extractCertificate
- getCertificate
- importCertificate
- listPersonalCertificates
- receiveCertificate
- replaceCertificate
createSelfSignedCertificate
The createSelfSignedCertificate command creates a personal certificate in a key store.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- -certificateV
- The version of the certificate. (String, required)
- -certificateSize
- The size of the certificate. (Integer, required)
- -certificateCommonName
- The common name of the certificate. (String, required)
- -certificateOrganization
- The organization of the certificate. (String, optional)
- -certificateOrganizationUnit
- The organizational unit of the certificate. (String, optional)
- -certificateLocality
- The locality of the certificate. (String, optional)
- -certificateState
- The state of the certificate. (String, optional)
- -certificateZip
- The zip code of the certificate. (String, optional)
- -certificateCountry
- The country of the certificate. (String, optional)
- -certificateValidDays
- The amount of time in days for which the certificate is valid. (Integer, optional)
- Returns: None.
Examples
Batch mode example usage:
- Use Jacl:
$AdminTask createSelfSignedCertificate {-keyStoreName testKeyStore -certificateAlias default -certificateCommonName localhost -certificateOrganization ibm}
- Use Jython string:
AdminTask.createSelfSignedCertificate('[-keyStoreName testKeyStore -certificateAlias default -certificateCommonName localhost -certificateOrganization ibm]')
- Use Jython list:
AdminTask.createSelfSignedCertificate(['-keyStoreName', 'testKeyStore', '-certificateAlias', 'default', '-certificateCommonName', 'localhost', '-certificateOrganization', 'ibm'])
Interactive mode example usage:
- Use Jacl:
$AdminTask createSelfSignedCertificate {-interactive}
- Use Jython string:
AdminTask.createSelfSignedCertificate ('[-interactive]')
- Use Jython list:
AdminTask.createSelfSignedCertificate (['-interactive'])
deleteCertificate
The deleteCertificate command deletes a personal certificate from a key store.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- Returns: None.
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask deleteCertificate {-interactive}
- Use Jython string:
AdminTask.deleteCertificate ('[-interactive]')
- Use Jython list:
AdminTask.deleteCertificate (['-interactive'])
exportCertificate
The exportCertificate command exports a personal certificate from one key store to another.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -keyStorePassword
- The password to the key store. (String, required)
- -keyFilePath
- The full path to a key store file that is located in a file system. The store from where a certificate will be imported or exported. (String, required)
- -keyFilePassword
- The password to the key store file. (String, required)
- -keyFileType
- The type of the key file. (String, required)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- -aliasInKeyStore
- (String, optional)
- Returns: None.
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask exportCertificate {-interactive}
- Use Jython string:
AdminTask.exportCertificate ('[-interactive]')
- Use Jython list:
AdminTask.exportCertificate (['-interactive'])
extractCertificate
The extractCertificate command extracts the signer part of a personal certificate to a file.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- -certificateRequest FilePath
- The full path of the request file that contains the certificate. (String, required)
- -base64Encoded
- Set the value of this parameter to true if the certificate is ascii base 64 encoded. Set the value of this parameter to false if the certificate is binary. (Boolean, required)
- Returns: None.
Examples
Batch mode example usage:
- Use Jacl:
$AdminTask extractCertificate {-keyStoreName testKeyStore -certificateFilePath c:\temp\CertFile.arm -certificateAlias testCertificate}
- Use Jython string:
AdminTask.extractCertificate('[-keyStoreName testKeyStore -certificateFilePath c:\temp\CertFile.arm -certificateAlias testCertificate]')
- Use Jython list:
AdminTask.extractCertificate(['-keyStoreName', 'testKeyStore', '-certificateFilePath', 'c:\temp\CertFile.arm', '-certificateAlias', 'testCertificate'])
Interactive mode example usage:
- Use Jacl:
$AdminTask extractCertificate {-interactive}
- Use Jython string:
AdminTask.extractCertificate ('[-interactive]')
- Use Jython list:
AdminTask.extractCertificate (['-interactive'])
getCertificate
The getCertificate command obtains information about a particular personal certificate in a key store.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- Returns: Information about the certificate request.
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask getCertificate {-interactive}
- Use Jython string:
AdminTask.getCertificate ('[-interactive]')
- Use Jython list:
AdminTask.getCertificate (['-interactive'])
importCertificate
The importCertificate command imports a personal certificate from a key store.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -keyFilePath
- The full path to a key store file that is located in a file system. The store from where a certificate will be imported or exported. (String, required)
- -keyFilePassword
- The password to the key store file. (String, required)
- -keyFileType
- The type of the key file. (String, required)
- -certificateAliasFromKeyFile
- The certificate alias in the key file from which the certificate is being imported. (String, required)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- Returns: None.
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask importCertificate {-interactive}
- Use Jython string:
AdminTask.importCertificate ('[-interactive]')
- Use Jython list:
AdminTask.importCertificate (['-interactive'])
listPersonalCertificates
The listPersonalCertificates command lists the personal certificates in a particular key store.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- Returns: A list of attributes for each personal certificate in a key store.
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask listPersonalCertificates {-interactive}
- Use Jython string:
AdminTask.listPersonalCertificates ('[-interactive]')
- Use Jython list:
AdminTask.listPersonalCertificates (['-interactive'])
receiveCertificate
The receiveCertificate command receives a signer certificate from a file to a personal certificate.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- -certificateFilePath
- The full path of the file that contains the certificate. (String, required)
- -base64Encoded
- Set the value of this parameter to true if the certificate is ascii base 64 encoded. Set the value of this parameter to false if the certificate is binary. (Boolean, required)
- Returns: None.
Examples
Batch mode example usage:
- Use Jacl:
$AdminTask receiveCertificate {-keyStoreName testKeyStore -certificateFilePath c:\temp\CertFile.arm}
- Use Jython string:
AdminTask.receiveCertificate('[-keyStoreName testKeyStore -certificateFilePath c:\temp\CertFile.arm]')
- Use Jython list:
AdminTask.receiveCertificate(['-keyStoreName', 'testKeyStore', '-certificateFilePath', 'c:\temp\CertFile.arm'])
Interactive mode example usage:
- Use Jacl:
$AdminTask receiveCertificate {-interactive}
- Use Jython string:
AdminTask.receiveCertificate ('[-interactive]')
- Use Jython list:
AdminTask.receiveCertificate (['-interactive'])
replaceCertificate
The replaceCertificate command replaces a personal certificate with a new one. Replaces all signer certificates from the personal certificate.
Target object None.
Required parameters and return values
- -keyStoreName
- The name that uniquely identifies the key store configuration object. (String, required)
- -keyStoreScope
- The scope name of the key store. (String, optional)
- -certificateAlias
- The name that uniquely identifies the certificate request in a key store. (String, required)
- -replacementCertifi cateAlias
- The alias of the certificate that is used to replace a different certificate. (String, required)
- -deleteOldCert
- Set the value of this parameter to true if you want to delete the old signer certificates during certificate replacement. Otherwise, set the value of this parameter to false. (Boolean, optional)
- -deleteOldSigners
- Set the value of this parameter to true if you want to delete the old certificates during certificate replacement. Otherwise, set the value of this parameter to false. (Boolean, optional)
- Returns: None.
Examples
Batch mode example usage:
- Use Jacl:
$AdminTask replaceCertificate {-keyStoreName testKeyStore -certificateAlias default -replacementCertificateAlias replaceCert -deleteOldCert true -deleteOldSigners true}
- Use Jython string:
AdminTask.replaceCertificate('[-keyStoreName testKeyStore -certificateAlias default -replacementCertificateAlias replaceCert -deleteOldCert true -deleteOldSigners true]')
- Use Jython list:
AdminTask.replaceCertificate(['-keyStoreName', 'testKeyStore', '-certificateAlias', 'default', '-replacementCertificateAlias', 'replaceCert', '-deleteOldCert', 'true', '-deleteOldSigners', 'true'])
Interactive mode example usage:
- Use Jacl:
$AdminTask replaceCertificate {-interactive}
- Use Jython string:
AdminTask.replaceCertificate ('[-interactive]')
- Use Jython list:
AdminTask.replaceCertificate (['-interactive'])
Related tasks
Use the AdminTask object for scripted administration
Related Reference
Commands for the AdminTask object
Reference topic