Websphere MQ Everyplace

examples.certificates
Class RenewWTLSCertificates

java.lang.Object
  |
  +--examples.certificates.RenewWTLSCertificates

public class RenewWTLSCertificates
extends java.lang.Object

Renews a WTLS certificate in a registry using the renewCertificates() method in MQePrivateRegistryConfigure. The certificate for the mini-certifiate server itself is obtained at the same time.

The example program takes four command-line parameters:

RenewWTLSCertificates [entity] [ini file] [MCS addr] [MCS Pin]

where:

                                                                            
        entity   -  is the name of the entity for which a renewed             
                    certificate is required. This would typically be          
                    either a queue manager (eg ExampleQM) or a queue          
                    (eg ExampleQM+secureQueue)                                
                                                                               
        ini file -  is the name of the configuration file. This would         
                    typically be the same file that is used for the           
                    queue manager and it must contain a [Registry] section.   
                                                                              
        MCS addr -  is the name and port address of the mini-certificate      
                    server (eg myServer:8085)                                 
                                                                              
        MCS Pin  -  is the one-time use PIN issued by the mini-certificate    
                    server administrator to authorize this renewal request.   
                                                                              
  

Restrictions:

This example should only be used on a private registry, typically owned by a queue manager or a queue.


Field Summary
static short[] version
           
 
Constructor Summary
RenewWTLSCertificates()
          Empty constructor.
RenewWTLSCertificates(java.lang.String regName, java.lang.String iniFile)
          Constructor.
 
Method Summary
 void activate(java.lang.String regName, MQeFields configParams)
          Activate, ie initialialize everything.
 void close()
          Close - free any resources.
static void main(java.lang.String[] args)
          Main program
 void renew(java.lang.String miniCertServer, java.lang.String miniCertPIN)
          Renew the certificates in the registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version
Constructor Detail

RenewWTLSCertificates

public RenewWTLSCertificates()
Empty constructor. The activate() method must be called after this constructor.


RenewWTLSCertificates

public RenewWTLSCertificates(java.lang.String regName,
                             java.lang.String iniFile)
                      throws java.lang.Exception
Constructor. This calls activate(), which does all the initialisation work.

Parameters:
regName - The name of the registry
iniFile - The name of the ini file which identifies the registry. This can be either a queue manager's or a queue's registry.
Throws:
java.lang.exception - Thrown on error.
java.lang.Exception
Method Detail

activate

public void activate(java.lang.String regName,
                     MQeFields configParams)
              throws java.lang.Exception
Activate, ie initialialize everything.

Parameters:
regName - The name of the registry
configParams - The configuration parameters for the registry. This can be either a queue manager's or a queue's registry.
Returns:
void
Throws:
java.lang.exception - Thrown on error.
java.lang.Exception

renew

public void renew(java.lang.String miniCertServer,
                  java.lang.String miniCertPIN)
           throws java.lang.Exception
Renew the certificates in the registry

Parameters:
miniCertServer - The network address and port number of the Mini-Certificate Server.
miniCertPIN - The one-time PIN required by the Mini-Certificate Server.
Returns:
void
Throws:
MQeException - Propagated from renewCertificates()
java.lang.Exception

close

public void close()
Close - free any resources.

Returns:
void

main

public static void main(java.lang.String[] args)
Main program


Websphere MQ Everyplace