1147N/A * The contents of this file are subject to the terms of the 1147N/A * Common Development and Distribution License, Version 1.0 only 1147N/A * (the "License"). You may not use this file except in compliance 1147N/A * See the License for the specific language governing permissions 1147N/A * and limitations under the License. 1147N/A * When distributing Covered Code, include this CDDL HEADER in each 6983N/A * If applicable, add the following below this CDDL HEADER, with the 6983N/A * fields enclosed by brackets "[]" replaced with your own identifying 1147N/A * Portions Copyright [yyyy] [name of copyright owner] 5064N/A * Copyright 2006-2010 Sun Microsystems, Inc. 1147N/A * Class used to describe the Security Options specified by the user. 4937N/A /** Alias of a self-signed certificate. */ 1147N/A * The different type of security options that we can have. 1147N/A * No certificate to be used (and so no SSL and no Start TLS). 1147N/A * Use a newly created Self Signed Certificate. 4937N/A * Use an existing JKS key store. 4937N/A * Use an existing JCEKS key store. 4937N/A * Use an existing PKCS#11 key store. 4937N/A * Use an existing PKCS#12 key store. 1147N/A * Creates a new instance of a SecurityOptions representing for no certificate 1147N/A * @return a new instance of a SecurityOptions representing for no certificate 1147N/A * Creates a new instance of a SecurityOptions using a self-signed 1147N/A * @param enableSSL whether SSL is enabled or not. 1147N/A * @param enableStartTLS whether Start TLS is enabled or not. 1147N/A * @param sslPort the value of the LDAPS port. 1147N/A * @return a new instance of a SecurityOptions using a self-signed 5064N/A * Creates a new instance of a SecurityOptions using a self-signed 5064N/A * @param enableSSL whether SSL is enabled or not. 5064N/A * @param enableStartTLS whether Start TLS is enabled or not. 5064N/A * @param sslPort the value of the LDAPS port. 5064N/A * @param aliasToUse the alias of the certificate in the key store to be used. 5064N/A * @return a new instance of a SecurityOptions using a self-signed 1147N/A * Creates a new instance of a SecurityOptions using a Java Key Store. 1147N/A * @param keystorePath the path of the key store. 1147N/A * @param keystorePwd the password of the key store. 1147N/A * @param enableSSL whether SSL is enabled or not. 1147N/A * @param enableStartTLS whether Start TLS is enabled or not. 1147N/A * @param sslPort the value of the LDAPS port. 4929N/A * @param aliasToUse the alias of the certificate in the key store to be used. 1147N/A * @return a new instance of a SecurityOptions using a Java Key Store. 3850N/A * Creates a new instance of a SecurityOptions using a JCE Key Store. 3850N/A * @param keystorePath the path of the key store. 3850N/A * @param keystorePwd the password of the key store. 3850N/A * @param enableSSL whether SSL is enabled or not. 3850N/A * @param enableStartTLS whether Start TLS is enabled or not. 3850N/A * @param sslPort the value of the LDAPS port. 3850N/A * @param aliasToUse the alias of the certificate in the keystore to be used. 3850N/A * @return a new instance of a SecurityOptions using a JCE Key Store. 1147N/A * Creates a new instance of a SecurityOptions using a PKCS#11 Key Store. 1147N/A * @param keystorePwd the password of the key store. 1147N/A * @param enableSSL whether SSL is enabled or not. 1147N/A * @param enableStartTLS whether Start TLS is enabled or not. 1147N/A * @param sslPort the value of the LDAPS port. 1147N/A * @param aliasToUse the alias of the certificate in the keystore to be used. 1147N/A * @return a new instance of a SecurityOptions using a PKCS#11 Key Store. 1147N/A * Creates a new instance of a SecurityOptions using a PKCS#12 Key Store. 1147N/A * @param keystorePath the path of the key store. 1147N/A * @param keystorePwd the password of the key store. 1147N/A * @param enableSSL whether SSL is enabled or not. 1147N/A * @param enableStartTLS whether Start TLS is enabled or not. 1147N/A * @param sslPort the value of the LDAPS port. 1147N/A * @param aliasToUse the alias of the certificate in the keystore to be used. 1147N/A * @return a new instance of a SecurityOptions using a PKCS#12 Key Store. 1147N/A * Returns the CertificateType for this instance. 1147N/A * @return the CertificateType for this instance. 1147N/A * Sets the CertificateType for this instance. 1147N/A * @param certificateType the CertificateType for this instance. 1147N/A * Returns whether SSL is enabled or not. 1147N/A * @return <CODE>true</CODE> if SSL is enabled and <CODE>false</CODE> 1147N/A * Sets whether SSL is enabled or not. 1147N/A * @param enableSSL whether SSL is enabled or not. 1147N/A * Returns whether StartTLS is enabled or not. 1147N/A * @return <CODE>true</CODE> if StartTLS is enabled and <CODE>false</CODE> 1147N/A * Sets whether StartTLS is enabled or not. 1147N/A * @param enableStartTLS whether StartTLS is enabled or not. 1147N/A * Returns the key store password. 1147N/A * @return the key store password. 1147N/A * Sets the key store password. 1502N/A * @param keyStorePassword the new key store password. 1147N/A * Returns the key store path. 1147N/A * @return the key store path. 1147N/A * @param keyStorePath the new key store path. 1147N/A * Updates the provided certificate options object with some parameters. 1147N/A * @param ops the SecurityOptions object to be updated. 1147N/A * @param enableSSL whether to enable SSL or not. 1147N/A * @param enableStartTLS whether to enable StartTLS or not. 1147N/A * @param sslPort the LDAPS port number. 1147N/A * @param aliasToUse the name of the alias to be used. 1147N/A "You must enable SSL or StartTLS to use a certificate.");
1147N/A * @param sslPort the new SSL port. 4929N/A * Returns the alias of the certificate in the key store to be used. 4929N/A * @return the alias of the certificate in the key store to be used. 1147N/A * Sets the certificate alias name. 1147N/A * @param aliasToUse the certificate alias name.