001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.server;
027
028
029
030import org.opends.server.admin.server.ConfigurationChangeListener;
031
032
033
034/**
035 * A server-side interface for querying PKCS11 Key Manager Provider
036 * settings.
037 * <p>
038 * The PKCS11 Key Manager Provider enables the server to access the
039 * private key information through the PKCS11 interface.
040 */
041public interface PKCS11KeyManagerProviderCfg extends KeyManagerProviderCfg {
042
043  /**
044   * Gets the configuration class associated with this PKCS11 Key Manager Provider.
045   *
046   * @return Returns the configuration class associated with this PKCS11 Key Manager Provider.
047   */
048  Class<? extends PKCS11KeyManagerProviderCfg> configurationClass();
049
050
051
052  /**
053   * Register to be notified when this PKCS11 Key Manager Provider is changed.
054   *
055   * @param listener
056   *          The PKCS11 Key Manager Provider configuration change listener.
057   */
058  void addPKCS11ChangeListener(ConfigurationChangeListener<PKCS11KeyManagerProviderCfg> listener);
059
060
061
062  /**
063   * Deregister an existing PKCS11 Key Manager Provider configuration change listener.
064   *
065   * @param listener
066   *          The PKCS11 Key Manager Provider configuration change listener.
067   */
068  void removePKCS11ChangeListener(ConfigurationChangeListener<PKCS11KeyManagerProviderCfg> listener);
069
070
071
072  /**
073   * Gets the "java-class" property.
074   * <p>
075   * The fully-qualified name of the Java class that provides the
076   * PKCS11 Key Manager Provider implementation.
077   *
078   * @return Returns the value of the "java-class" property.
079   */
080  String getJavaClass();
081
082
083
084  /**
085   * Gets the "key-store-pin" property.
086   * <p>
087   * Specifies the clear-text PIN needed to access the PKCS11 Key
088   * Manager Provider .
089   *
090   * @return Returns the value of the "key-store-pin" property.
091   */
092  String getKeyStorePin();
093
094
095
096  /**
097   * Gets the "key-store-pin-environment-variable" property.
098   * <p>
099   * Specifies the name of the environment variable that contains the
100   * clear-text PIN needed to access the PKCS11 Key Manager Provider .
101   *
102   * @return Returns the value of the "key-store-pin-environment-variable" property.
103   */
104  String getKeyStorePinEnvironmentVariable();
105
106
107
108  /**
109   * Gets the "key-store-pin-file" property.
110   * <p>
111   * Specifies the path to the text file whose only contents should be
112   * a single line containing the clear-text PIN needed to access the
113   * PKCS11 Key Manager Provider .
114   *
115   * @return Returns the value of the "key-store-pin-file" property.
116   */
117  String getKeyStorePinFile();
118
119
120
121  /**
122   * Gets the "key-store-pin-property" property.
123   * <p>
124   * Specifies the name of the Java property that contains the
125   * clear-text PIN needed to access the PKCS11 Key Manager Provider .
126   *
127   * @return Returns the value of the "key-store-pin-property" property.
128   */
129  String getKeyStorePinProperty();
130
131}