|
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.MQeMiniCertSvrRegistry
This class is used by the MQeMiniCertificateServer class to access the one-time request PINs that are used to authorize certificate requests and to store the mini-certificates that it generates.
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 | |
MQeMiniCertSvrRegistry()
This constructs a MQeMiniCertSvrRegistry object. |
Method Summary | |
void |
activate(java.lang.String pin,
java.lang.String keyRingPassword,
java.lang.String startDir)
Opens and initializes the registry. |
void |
addAuthEntity(java.lang.String entityName,
java.lang.String certReqPIN)
Adds a one-time request PIN for an entity. |
void |
addEntityAddr(java.lang.String entityName,
MQeFields entityRegAddr)
Adds an address for an entity. |
boolean |
authoriseMiniCertRequest(java.lang.String entityName,
java.lang.String certReqPIN)
Checks whether a certificate request has been authorized. |
void |
deleteAuthEntity(java.lang.String entityName)
Deletes an entity’s one-time request PIN. |
void |
deleteEntityAddr(java.lang.String entityName)
Deletes an entity’s address. |
byte[] |
readAuthEntity(java.lang.String entityName)
Reads an entity’s one-time request PIN. |
MQeFields |
readEntityAddr(java.lang.String entityName)
Reads an entity’s address. |
boolean |
updateAuthEntity(java.lang.String entityName,
java.lang.String newCertReqPIN)
Updates an entity’s one-time request PIN. |
boolean |
updateEntityAddr(java.lang.String entityName,
MQeFields entityRegAddr)
Updates an entity’s address. |
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 MQeMiniCertSvrRegistry()
This constructs a MQeMiniCertSvrRegistry object.
Method Detail |
public void activate(java.lang.String pin, java.lang.String keyRingPassword, java.lang.String startDir) throws java.lang.Exception
Opens and initializes the registry.
This opens a registry for the mini-certificate server, creating the registry if it does not exist.
pin
- The passphrase (PIN) that is required in order to access the
registry. This is set when the registry is created (the first time it is
activated), and it is checked every time that the registry is activated
subsequently.keyRingPassword
- The password used to protect the mini-certificate
server's own private key.startDir
- The base directory in the file system that holds the registry.
This is usually the current directory.
java.lang.Exception
- Thrown on any error.public boolean authoriseMiniCertRequest(java.lang.String entityName, java.lang.String certReqPIN)
Checks whether a certificate request has been authorized.
This is used by the mini-certificate server to check whether a request for a certificate has been authorised. It checks whether the certificate request PIN supplied as a parameter matches that stored in the registry for the entity. If it matches, the method returns true to authorise the request. If it does not match, or if there is no PIN for the entity in the registry, the method returns false. This method should not be called by the user, but a use can override this method to change the way that the mini-certificate server checks for authorisation.
entityName
- The name of the entity making the request.certReqPIN
- The certificate request PIN supplied by the entity.
public void addAuthEntity(java.lang.String entityName, java.lang.String certReqPIN) throws MQeException
Adds a one-time request PIN for an entity.
This adds a certificate request PIN to the registry. The request PIN is used by the mini-certificate server to authorize a request for a certificate. An exception is thrown if the entity already has a request PIN.
entityName
- The name of the entity whose certificate request PIN is
to be stored.certReqPIN
- The one-time certificate request PIN to be stored for this
entity.
MQeException
- public boolean updateAuthEntity(java.lang.String entityName, java.lang.String newCertReqPIN) throws MQeException
Updates an entity’s one-time request PIN.
This updates a certificate request PIN in the registry. The request PIN is used by the mini-certificate server to authorize a request for a certificate. A PIN for the entity should already exist in the registry.
entityName
- The name of the entity whose PIN is to be updatednewCertReqPIN
- The new value for the certificate request PIN to be stored
for this entity. If this is null the request PIN is invalidated, (it is not
removed but it can no longer be used). The mini-certificate server invalidates
the PIN once it has successfully used it to return a certificate.
MQeException
- Thrown if there is an error constructing the data to
store in the registry.public byte[] readAuthEntity(java.lang.String entityName) throws MQeException
Reads an entity’s one-time request PIN.
This method can be used to check whether a request PIN exists for an entity. It returns a byte array containing an encoded form of the PIN.
entityName
- The name of the entity whose PIN is to be checked.
MQeException
- public void deleteAuthEntity(java.lang.String entityName) throws MQeException
Deletes an entity’s one-time request PIN.
entityName
- The name of the entity whose PIN is to be deleted.
MQeException
- Except_Reg_DeleteFailed : Thrown if there is an error deleting the entry.public void addEntityAddr(java.lang.String entityName, MQeFields entityRegAddr) throws MQeException
Adds an address for an entity.
This adds an address for an entity to the registry. The address can take any form, as long as it can be stored in an MQeFields object. The address is not used by the mini-certificate server, it is designed to provide additional information to identify the entity requesting a certificate. An exception is thrown if the entity already has an address stored in the registry.
entityName
- The name of the entity whose address is to be stored.entityRegAddr
- An MQeFields object holding the address for the entity.
The address can be in any format as long as it can be stored in an MQeFields object.
MQeException
- public boolean updateEntityAddr(java.lang.String entityName, MQeFields entityRegAddr) throws MQeException
Updates an entity’s address.
This updates an address for an entity in the registry. The address can take any form as long as it can be stored in a MQeFields object. The address is not used by the mini-certificate server, it is designed to provide additional information to identify the entity requesting a certificate. An address for the entity should already exist in the registry.
entityName
- The name of the entity whose address is to be updated.entityRegAddr
- An MQeFields object holding the updated address for the entity.
The address can be in any format as long as it can be stored in an MQeFields object.
MQeException
- Except_Reg_UpdateFailed : Thrown if there is an error updating the registry.public MQeFields readEntityAddr(java.lang.String entityName) throws MQeException
Reads an entity’s address.
This reads an address for an entity from the registry. The address is designed to provide additional information to identify the entity requesting a certificate.
entityName
- The name of the entity whose address is to be read.
MQeException
- public void deleteEntityAddr(java.lang.String entityName) throws MQeException
Deletes an entity’s address.
This deletes an address for an entity from the registry.
entityName
- The name of the entity whose address is to be deleted.
MQeException
- Except_Reg_DeleteFailed : Thrown if there is an error deleting the entry.
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |