|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.MQe | +--com.ibm.mqe.registry.MQeRegistry | +--com.ibm.mqe.registry.MQePrivateRegistry
This class is used to create an MQePrivateRegistry object. MQePrivateRegistry class is a descendent of MQeRegistry and provides controlled access to a set of private and public objects (for example certificates). MQePrivateRegistry objects also support digital signing and decryption services which can use the registry’s private objects (for example an authenticatable entity’s private key) internally, so they do not leave the private registry.
This class is a descendant of MQeRegistry.
Field Summary |
Fields inherited from class com.ibm.mqe.registry.MQeRegistry |
Adapter, CAIPAddrPort, CertReqPIN, DirName, FileRegistry, KeyRingPassword, LocalRegType, PIN, PrivateRegistry, Separator |
Constructor Summary | |
MQePrivateRegistry()
Constructs an MQePrivateRegistry object. |
Method Summary | |
void |
activate(java.lang.String name,
java.lang.String dirName,
java.lang.String pin,
java.lang.Object keyRingPassword,
java.lang.Object certReqPIN,
java.lang.Object caIPAddrPort)
Opens and activates the MQePrivateRegistry instance. |
void |
close()
Close the registry. |
void |
deleteCertificate(java.lang.String certificateOwner)
Deletes the certificate owner’s mini-certificate. |
MQeFields |
getCertificate(java.lang.String certificateOwner)
Returns the certificate owner’s mini-certificate. |
Methods inherited from class com.ibm.mqe.MQe |
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MQePrivateRegistry()
Constructs an MQePrivateRegistry object.
MQePrivateRegistry
Method Detail |
public void activate(java.lang.String name, java.lang.String dirName, java.lang.String pin, java.lang.Object keyRingPassword, java.lang.Object certReqPIN, java.lang.Object caIPAddrPort) throws java.lang.Exception
Opens and activates the MQePrivateRegistry instance.
If a private registry with this entityName exists, activate() attempts to open the private registry using the given pin. If it does not exist, activate() creates and opens a new private registry and makes it accessible with the given pin. If a non-null mini-certificate server address (caIPAddrPort) is provided, activate() searches the private registry to discover if the owner is already registered (already has its own mini-certificate). If it is not registered (no mini-certificate), activate() executes autoregistration. This autoregisters the entityName, performing the following tasks:
getCertificate(java.lang.String)
request to get the
mini-certificate server's (own) mini-certificate, and saves it in the private registry.
name
- PrivateRegistry owner EntityName.dirName
- Path to PrivateRegistry.pin
- Number, password or passphrase to be used to open the
private registry.keyRingPassword
- String password or passphrase used to protect the entity's
private key.certReqPIN
- String with one-time-use Certificate Request Number
preallocated for the entity by the mini-certificate server
administrator to enable it to autoregister.caIPAddrPort
- String containing information on how the certificate issuance server can be
contacted.
The format of the string, in BNF notation, is: [<optional_adapter_name>]':'<ip_address>':'<port>
The optional_adapter_name is the name of a communications adapter class, without the .class
suffix, or an MQe alias of the class set up using MQe.alias(java.lang.String, java.lang.String)
.
This part of the string, and the colon following is optional.
The adapter indicates which protocol is used to communicate with the certificate issuance server,
so it should match the protocol being used by the certificate issuance server.
If this part of the string is missing, then a default of MQeTcpipHttpAdapter
is assumed.
The ip_address part of the string is a dotted-ip address, or DNS host name (if DNS is available) indicating the address of the certicate issuance service. This part of the string is mandatory.
The port part of the string is the port number on which the issuance server is listening.
For example, com.ibm.mqe.adapters.MQeTcpipHttpAdapter:aname.hursley.ibm.com:8082
java.lang.Exception
- try { // setup Private Registry activate parameters String entityName = "Bruce"; String dirName = ".//" + entityName; String entityPIN = "12345678"; Object keyRingPassword = "It_is_a_secret"; Object certReqPIN = "12345678"; Object caIPAddrPort = "aname.hursley.ibm.com:8082"; // instantiate and activate a Private Registry... MQePrivateRegistry preg = new MQePrivateRegistry(); // instantiate and activate the Private Registry preg.activate(entityName, // name of entity owning privreg dirName, // params to open file regsess'n entityPIN, // Private Registry access PIN keyRingPassword, // pwd/phrase protecting CRTKey certReqPIN, // prereg MiniCertSvr certreqPIN caIPAddrPort); // trusted MiniCertSvr addr:port } catch (Exception e) {// Handle the exception here. }
public MQeFields getCertificate(java.lang.String certificateOwner) throws MQeException
Returns the certificate owner’s mini-certificate.
certificateOwner
- Private registry owner's name.
MQeException
- Except_reg_readFailed, "Error reading entry"deleteCertificate(java.lang.String)
public void deleteCertificate(java.lang.String certificateOwner) throws java.lang.Exception
Deletes the certificate owner’s mini-certificate.
certificateOwner
- Private registry owner's name.
java.lang.Exception
- getCertificate(java.lang.String)
public void close()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |