Websphere MQ Everyplace

examples.certificates
Class ListWTLSCertificates

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

public class ListWTLSCertificates
extends java.lang.Object

List certificates in a registry, at different levels of detail. This uses the com.ibm.mqe.attributes.MQeListCertificate class to read the certificates from the registry and get the required information from the certificates.

The example program takes these command-line parameters:

ListWTLSCertificates [reg Name] [ini file] [level] [cert names]

where:


        reg Name -   is the name of the registry whose certificates are to
                     be listed. This can be a queue manager's registry, a
                     queue's registry, a public registry, or (for the
                     administrator) the mini-certificate server's registry.

        ini file -   is the name of the configuration file. This would
                     typically be the same file that is used for the
                     queue manager or mini-certificate server. This can be
                     omitted for public registries.

        level    -   is the level of detail for the listing. This can be:
                     -b or -brief    this is the default. It prints the
                                     names of the certificates, one per
                                     line.
                     -f or -full     prints the names of the certificates,
                                     their type, and some of their contents

        cert names - the flag "-cn" followed by names of specific
                     certificates, eg:
                        -cn ExampleQM putQM
                     If certificate names are specified, only these
                     certificates will be listed. If no names are specified,
                     all the certificates in the registry will be listed.
 


Field Summary
static java.lang.String issuer
           
static java.lang.String MiniCertificateServer
           
static java.lang.String MiniCertSvrRegistry
           
static java.lang.String notAfter
           
static java.lang.String notBefore
           
static java.lang.String Registry
           
static java.lang.String subject
           
static short[] version
           
 
Constructor Summary
ListWTLSCertificates()
          Empty constructor.
 
Method Summary
 void close()
          Close - free any resources.
 void list()
          List the certificates in the registry.
static void main(java.lang.String[] args)
          Main program
 void openList()
          OpenList, ie initialialize everything.
 
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

MiniCertSvrRegistry

public static final java.lang.String MiniCertSvrRegistry
See Also:
Constant Field Values

Registry

public static final java.lang.String Registry
See Also:
Constant Field Values

MiniCertificateServer

public static final java.lang.String MiniCertificateServer
See Also:
Constant Field Values

subject

public static final java.lang.String subject
See Also:
Constant Field Values

issuer

public static final java.lang.String issuer
See Also:
Constant Field Values

notBefore

public static final java.lang.String notBefore
See Also:
Constant Field Values

notAfter

public static final java.lang.String notAfter
See Also:
Constant Field Values
Constructor Detail

ListWTLSCertificates

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

Method Detail

openList

public void openList()
              throws java.lang.Exception
OpenList, ie initialialize everything.

Returns:
void
Throws:
java.lang.exception - Thrown on error.
java.lang.Exception

list

public void list()
          throws java.lang.Exception
List the certificates in the registry.

Returns:
void
Throws:
MQeException
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