org.apache.commons.ssl

## Class TomcatServerXML

- java.lang.Object
- - org.apache.commons.ssl.TomcatServerXML

    public class TomcatServerXML
    extends java.lang.Object

Since:
  22-Feb-2007
Author:
  Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com

### Field Summary

Fields
`static KeyMaterial` `KEY_MATERIAL` KeyMaterial extracted from Tomcat's conf/server.xml.
`static java.util.SortedMap` `KEY_MATERIAL_BY_PORT` new Integer( port ) --> KeyMaterial mapping of SSL Certificates found inside Tomcat's conf/server.xml file.
`private static LogWrapper` `log`
`static TrustMaterial` `TRUST_MATERIAL` TrustMaterial extracted from Tomcat's conf/server.xml.
`static java.util.SortedMap` `TRUST_MATERIAL_BY_PORT` new Integer( port ) --> TrustMaterial mapping of SSL configuration found inside Tomcat's conf/server.xml file.

### Constructor Summary

Constructors
Constructor and Description
`TomcatServerXML()`

### Method Summary

Methods
`private static void` `loadTomcatConfig(org.w3c.dom.Document d, java.util.Map keyMap, java.util.Map trustMap)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### log

    private static final LogWrapper log

#### KEY_MATERIAL

    public static final KeyMaterial KEY_MATERIAL

KeyMaterial extracted from Tomcat's conf/server.xml. There might be several KeyMaterials to extract if Tomcat has different SSL Certificates listening on different ports. This particular KeyMaterial will come from the lowest secure port that Tomcat is properly configured to open.

#### TRUST_MATERIAL

    public static final TrustMaterial TRUST_MATERIAL

TrustMaterial extracted from Tomcat's conf/server.xml. There might be several TrustMaterials to extract if Tomcat has different SSL Certificates listening on different ports. This particular TrustMaterial will come from the lowest secure port that Tomcat is properly configured to open.

There's a good chance this will be set to TrustMaterial.DEFAULT (which use's the JVM's '$JAVA_HOME/jre/lib/security/cacerts' file).

Note: With SSLServerSockets, TrustMaterial only matters when the incoming client socket (SSLSocket) presents a client certificate.

#### KEY_MATERIAL_BY_PORT

    public static final java.util.SortedMap KEY_MATERIAL_BY_PORT

new Integer( port ) --> KeyMaterial mapping of SSL Certificates found inside Tomcat's conf/server.xml file.

#### TRUST_MATERIAL_BY_PORT

    public static final java.util.SortedMap TRUST_MATERIAL_BY_PORT

new Integer( port ) --> TrustMaterial mapping of SSL configuration found inside Tomcat's conf/server.xml file.

Many of these will probably be TrustMaterial.DEFAULT (which uses the JVM's '$JAVA_HOME/jre/lib/security/cacerts' file).

Note: With SSLServerSockets, TrustMaterial only matters when the incoming client socket (SSLSocket) presents a client certificate.

### Constructor Detail

#### TomcatServerXML

    public TomcatServerXML()

### Method Detail

#### loadTomcatConfig

    private static void loadTomcatConfig(org.w3c.dom.Document d,
                        java.util.Map keyMap,
                        java.util.Map trustMap)