| | |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2009 Parametric Technology Corporation (PTC) |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.crypto; |
| | | |
| | | import org.opends.messages.Message; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | |
| | | import java.io.InputStream; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | |
| | | import java.security.*; |
| | | import java.security.cert.Certificate; |
| | | import java.security.cert.CertificateFactory; |
| | | import java.text.ParseException; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.zip.DataFormatException; |
| | | import java.util.zip.Deflater; |
| | | import java.util.zip.Inflater; |
| | | import java.text.ParseException; |
| | | |
| | | import javax.crypto.*; |
| | | import javax.crypto.spec.IvParameterSpec; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | import javax.net.ssl.KeyManager; |
| | | import javax.net.ssl.TrustManager; |
| | | import javax.net.ssl.SSLContext; |
| | | import javax.net.ssl.TrustManager; |
| | | import javax.net.ssl.X509ExtendedKeyManager; |
| | | |
| | | import org.opends.admin.ads.ADSContext; |
| | | import org.opends.server.admin.std.server.CryptoManagerCfg; |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.server.CryptoManagerCfg; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.backends.TrustStoreBackend; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import org.opends.server.util.Validator; |
| | | import org.opends.server.util.SelectableCertificateKeyManager; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.Base64; |
| | | import org.opends.server.util.ServerConstants; |
| | | import static org.opends.server.util.ServerConstants.OC_TOP; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.ldap.ExtendedRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.protocols.ldap.ExtendedResponseProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.schema.BinarySyntax; |
| | | import org.opends.server.schema.DirectoryStringSyntax; |
| | | import org.opends.server.schema.IntegerSyntax; |
| | | import org.opends.server.schema.BinarySyntax; |
| | | import org.opends.server.tools.LDAPConnection; |
| | | import org.opends.server.tools.LDAPConnectionOptions; |
| | | import org.opends.server.tools.LDAPReader; |
| | | import org.opends.server.tools.LDAPWriter; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.*; |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | This class implements the Directory Server cryptographic framework, |
| | |
| | | private static ObjectClass ocCipherKey; |
| | | private static ObjectClass ocMacKey; |
| | | |
| | | // The DN of the local truststore backend. |
| | | /** The DN of the local truststore backend. */ |
| | | private static DN localTruststoreDN; |
| | | |
| | | // The DN of the ADS instance keys container. |
| | | /** The DN of the ADS instance keys container. */ |
| | | private static DN instanceKeysDN; |
| | | |
| | | // The DN of the ADS secret keys container. |
| | | /** The DN of the ADS secret keys container. */ |
| | | private static DN secretKeysDN; |
| | | |
| | | // The DN of the ADS servers container. |
| | | /** The DN of the ADS servers container. */ |
| | | private static DN serversDN; |
| | | |
| | | // Indicates whether the schema references have been initialized. |
| | | /** Indicates whether the schema references have been initialized. */ |
| | | private static boolean schemaInitDone = false; |
| | | |
| | | // The secure random number generator used for key generation, |
| | | // initialization vector PRNG seed... |
| | | /** |
| | | * The secure random number generator used for key generation, initialization |
| | | * vector PRNG seed... |
| | | */ |
| | | private static final SecureRandom secureRandom = new SecureRandom(); |
| | | |
| | | // The random number generator used for initialization vector |
| | | // production. |
| | | /** The random number generator used for initialization vector production. */ |
| | | private static final Random pseudoRandom |
| | | = new Random(secureRandom.nextLong()); |
| | | |
| | | // The first byte in any ciphertext produced by CryptoManager is the |
| | | // prologue version. At present, this constant is both the version written |
| | | // and the expected version. If a new version is introduced (e.g., to allow |
| | | // embedding the HMAC key identifier and signature in a signed backup) the |
| | | // prologue version will likely need to be configurable at the granularity |
| | | // of the CryptoManager client (e.g., password encryption might use version 1, |
| | | // while signed backups might use version 2. |
| | | /** |
| | | * The first byte in any ciphertext produced by CryptoManager is the prologue |
| | | * version. At present, this constant is both the version written and the |
| | | * expected version. If a new version is introduced (e.g., to allow embedding |
| | | * the HMAC key identifier and signature in a signed backup) the prologue |
| | | * version will likely need to be configurable at the granularity of the |
| | | * CryptoManager client (e.g., password encryption might use version 1, while |
| | | * signed backups might use version 2. |
| | | */ |
| | | private static final int CIPHERTEXT_PROLOGUE_VERSION = 1 ; |
| | | |
| | | // The map from encryption key ID to CipherKeyEntry (cache). The |
| | | // cache is accessed by methods that request, publish, and import |
| | | // keys. |
| | | /** |
| | | * The map from encryption key ID to CipherKeyEntry (cache). The cache is |
| | | * accessed by methods that request, publish, and import keys. |
| | | */ |
| | | private final Map<KeyEntryID, CipherKeyEntry> cipherKeyEntryCache |
| | | = new ConcurrentHashMap<KeyEntryID, CipherKeyEntry>(); |
| | | |
| | | // The map from encryption key ID to MacKeyEntry (cache). The cache |
| | | // is accessed by methods that request, publish, and import keys. |
| | | /** |
| | | * The map from encryption key ID to MacKeyEntry (cache). The cache is |
| | | * accessed by methods that request, publish, and import keys. |
| | | */ |
| | | private final Map<KeyEntryID, MacKeyEntry> macKeyEntryCache |
| | | = new ConcurrentHashMap<KeyEntryID, MacKeyEntry>(); |
| | | |
| | | |
| | | // The preferred key wrapping transformation |
| | | /** The preferred key wrapping transformation. */ |
| | | private String preferredKeyWrappingTransformation; |
| | | |
| | | |
| | | // TODO: Move the following configuration to backup or backend configuration. |
| | | // TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2472 |
| | | |
| | | // The preferred message digest algorithm for the Directory Server. |
| | | /** The preferred message digest algorithm for the Directory Server. */ |
| | | private String preferredDigestAlgorithm; |
| | | |
| | | // The preferred cipher for the Directory Server. |
| | | /** The preferred cipher for the Directory Server. */ |
| | | private String preferredCipherTransformation; |
| | | |
| | | // The preferred key length for the preferred cipher. |
| | | /** The preferred key length for the preferred cipher. */ |
| | | private int preferredCipherTransformationKeyLengthBits; |
| | | |
| | | // The preferred MAC algorithm for the Directory Server. |
| | | /** The preferred MAC algorithm for the Directory Server. */ |
| | | private String preferredMACAlgorithm; |
| | | |
| | | // The preferred key length for the preferred MAC algorithm. |
| | | /** The preferred key length for the preferred MAC algorithm. */ |
| | | private int preferredMACAlgorithmKeyLengthBits; |
| | | |
| | | |
| | | // TODO: Move the following configuration to replication configuration. |
| | | // TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2473 |
| | | |
| | | // The name of the local certificate to use for SSL. |
| | | /** The name of the local certificate to use for SSL. */ |
| | | private final String sslCertNickname; |
| | | |
| | | // Whether replication sessions use SSL encryption. |
| | | /** Whether replication sessions use SSL encryption. */ |
| | | private final boolean sslEncryption; |
| | | |
| | | // The set of SSL protocols enabled or null for the default set. |
| | | /** The set of SSL protocols enabled or null for the default set. */ |
| | | private final SortedSet<String> sslProtocols; |
| | | |
| | | // The set of SSL cipher suites enabled or null for the default set. |
| | | /** The set of SSL cipher suites enabled or null for the default set. */ |
| | | private final SortedSet<String> sslCipherSuites; |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable( |
| | | CryptoManagerCfg cfg, |
| | | List<Message> unacceptableReasons) |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | CryptoManagerCfg cfg) |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange(CryptoManagerCfg cfg) |
| | | { |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | List<Message> messages = new ArrayList<Message>(); |
| | | |
| | | preferredDigestAlgorithm = cfg.getDigestAlgorithm(); |
| | | preferredMACAlgorithm = cfg.getMacAlgorithm(); |
| | | preferredMACAlgorithmKeyLengthBits = cfg.getMacKeyLength(); |
| | | preferredCipherTransformation = cfg.getCipherTransformation(); |
| | | preferredCipherTransformationKeyLengthBits = cfg.getCipherKeyLength(); |
| | | preferredKeyWrappingTransformation = cfg.getKeyWrappingTransformation(); |
| | | return new ConfigChangeResult(resultCode, adminActionRequired, messages); |
| | | return new ConfigChangeResult(ResultCode.SUCCESS, false, |
| | | new ArrayList<Message>()); |
| | | } |
| | | |
| | | |
| | |
| | | RDN.create(attrKeyID, distinguishedValue)); |
| | | // Construct the search filter. |
| | | final String FILTER_OC_INSTANCE_KEY = |
| | | new StringBuilder("(objectclass=") |
| | | .append(ocInstanceKey.getNameOrOID()) |
| | | .append(")").toString(); |
| | | "(objectclass=" + ocInstanceKey.getNameOrOID() + ")"; |
| | | // Construct the attribute list. |
| | | final LinkedHashSet<String> requestedAttributes |
| | | = new LinkedHashSet<String>(); |
| | |
| | | ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL.get(entryDN.toString()); |
| | | throw new CryptoManagerException(msg); |
| | | } |
| | | return(certificate); |
| | | return certificate; |
| | | } |
| | | |
| | | |
| | |
| | | RDN.create(attrKeyID, distinguishedValue)); |
| | | // Construct the search filter. |
| | | final String FILTER_OC_INSTANCE_KEY = |
| | | new StringBuilder("(objectclass=") |
| | | .append(ocInstanceKey.getNameOrOID()) |
| | | .append(")").toString(); |
| | | "(objectclass=" + ocInstanceKey.getNameOrOID() + ")"; |
| | | // Construct the attribute list. |
| | | final LinkedHashSet<String> requestedAttributes |
| | | = new LinkedHashSet<String>(); |
| | |
| | | = new HashMap<String, byte[]>(); |
| | | try { |
| | | // Construct the search filter. |
| | | final String FILTER_OC_INSTANCE_KEY |
| | | = new StringBuilder("(objectclass=") |
| | | .append(ocInstanceKey.getNameOrOID()) |
| | | .append(")").toString(); |
| | | final String FILTER_NOT_COMPROMISED = new StringBuilder("(!(") |
| | | .append(attrCompromisedTime.getNameOrOID()) |
| | | .append("=*))").toString(); |
| | | final String searchFilter = new StringBuilder("(&") |
| | | .append(FILTER_OC_INSTANCE_KEY) |
| | | .append(FILTER_NOT_COMPROMISED) |
| | | .append(")").toString(); |
| | | final String FILTER_OC_INSTANCE_KEY = |
| | | "(objectclass=" + ocInstanceKey.getNameOrOID() + ")"; |
| | | final String FILTER_NOT_COMPROMISED = |
| | | "(!(" + attrCompromisedTime.getNameOrOID() + "=*))"; |
| | | final String searchFilter = |
| | | "(&" + FILTER_OC_INSTANCE_KEY + FILTER_NOT_COMPROMISED + ")"; |
| | | // Construct the attribute list. |
| | | final LinkedHashSet<String> requestedAttributes |
| | | = new LinkedHashSet<String>(); |
| | |
| | | instanceKeysDN.toString(), |
| | | getExceptionMessage(ex)), ex); |
| | | } |
| | | return(certificateMap); |
| | | return certificateMap; |
| | | } |
| | | |
| | | |
| | |
| | | serversDN, SearchScope.SUBORDINATE_SUBTREE, |
| | | SearchFilter.createFilterFromString(filter)); |
| | | if (internalSearch.getResultCode() != ResultCode.SUCCESS) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | LinkedList<SearchResultEntry> resultEntries = |
| | | internalSearch.getSearchEntries(); |
| | |
| | | AtomicInteger nextMessageID = new AtomicInteger(1); |
| | | LDAPConnectionOptions connectionOptions = |
| | | new LDAPConnectionOptions(); |
| | | PrintStream nullPrintStream = |
| | | new PrintStream(new OutputStream() { |
| | | PrintStream nullPrintStream = new PrintStream(new OutputStream() { |
| | | @Override |
| | | public void write ( int b ) { } |
| | | }); |
| | | LDAPConnection connection = |
| | |
| | | void importCipherKeyEntry(Entry entry) |
| | | throws CryptoManagerException |
| | | { |
| | | // Ignore the entry if it does not have the appropriate |
| | | // objectclass. |
| | | if (!entry.hasObjectClass(ocCipherKey)) return; |
| | | // Ignore the entry if it does not have the appropriate objectclass. |
| | | if (!entry.hasObjectClass(ocCipherKey)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | |
| | | for (String symmetricKey : symmetricKeys) |
| | | { |
| | | secretKey = decodeSymmetricKeyAttribute(symmetricKey); |
| | | if (secretKey != null) break; |
| | | if (secretKey != null) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (null != secretKey) { |
| | |
| | | void importMacKeyEntry(Entry entry) |
| | | throws CryptoManagerException |
| | | { |
| | | // Ignore the entry if it does not have the appropriate |
| | | // objectclass. |
| | | if (!entry.hasObjectClass(ocMacKey)) return; |
| | | // Ignore the entry if it does not have the appropriate objectclass. |
| | | if (!entry.hasObjectClass(ocMacKey)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | |
| | | for (String symmetricKey : symmetricKeys) |
| | | { |
| | | secretKey = decodeSymmetricKeyAttribute(symmetricKey); |
| | | if (secretKey != null) break; |
| | | if (secretKey != null) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (secretKey == null) |
| | |
| | | * @return {@code true} if the objects are the same, {@code false} |
| | | * otherwise. |
| | | */ |
| | | @Override |
| | | public boolean equals(final Object obj){ |
| | | return obj instanceof KeyEntryID |
| | | && fValue.equals(((KeyEntryID) obj).fValue); |
| | |
| | | * |
| | | * @return a hash code value for this {@code KeyEntryID}. |
| | | */ |
| | | @Override |
| | | public int hashCode() { |
| | | return fValue.hashCode(); |
| | | } |
| | |
| | | final String transformation, |
| | | final int keyLengthBits) |
| | | throws CryptoManagerException { |
| | | |
| | | final Map<KeyEntryID, CipherKeyEntry> cache |
| | | = (null == cryptoManager) |
| | | ? null : cryptoManager.cipherKeyEntryCache; |
| | | final Map<KeyEntryID, CipherKeyEntry> cache = |
| | | cryptoManager != null ? cryptoManager.cipherKeyEntryCache : null; |
| | | |
| | | CipherKeyEntry keyEntry = new CipherKeyEntry(transformation, |
| | | keyLengthBits); |
| | | |
| | | // Validate the key entry. Record the initialization vector length, if |
| | | // any. |
| | | // Validate the key entry. Record the initialization vector length, if any |
| | | final Cipher cipher = getCipher(keyEntry, Cipher.ENCRYPT_MODE, null); |
| | | // TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2471 |
| | | final byte[] iv = cipher.getIV(); |
| | | keyEntry.setIVLengthBits((null == iv) ? 0 : iv.length * Byte.SIZE); |
| | | keyEntry.setIVLengthBits(null == iv ? 0 : iv.length * Byte.SIZE); |
| | | |
| | | if (null != cache) { |
| | | /* The key is published to ADS before making it available in the local |
| | |
| | | private static String keyAlgorithmFromTransformation( |
| | | String transformation){ |
| | | final int separatorIndex = transformation.indexOf('/'); |
| | | return (0 < separatorIndex) |
| | | return 0 < separatorIndex |
| | | ? transformation.substring(0, separatorIndex) |
| | | : transformation; |
| | | } |
| | |
| | | throws CryptoManagerException { |
| | | Validator.ensureNotNull(algorithm); |
| | | |
| | | final Map<KeyEntryID, MacKeyEntry> cache = (null == cryptoManager) |
| | | ? null : cryptoManager.macKeyEntryCache; |
| | | final Map<KeyEntryID, MacKeyEntry> cache = |
| | | cryptoManager != null ? cryptoManager.macKeyEntryCache : null; |
| | | |
| | | final MacKeyEntry keyEntry = new MacKeyEntry(algorithm, keyLengthBits); |
| | | |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getPreferredMessageDigestAlgorithm() |
| | | { |
| | | return preferredDigestAlgorithm; |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MessageDigest getPreferredMessageDigest() |
| | | throws NoSuchAlgorithmException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MessageDigest getMessageDigest(String digestAlgorithm) |
| | | throws NoSuchAlgorithmException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] digest(byte[] data) |
| | | throws NoSuchAlgorithmException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] digest(String digestAlgorithm, byte[] data) |
| | | throws NoSuchAlgorithmException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] digest(InputStream inputStream) |
| | | throws IOException, NoSuchAlgorithmException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] digest(String digestAlgorithm, |
| | | InputStream inputStream) |
| | | throws IOException, NoSuchAlgorithmException |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getMacEngineKeyEntryID() |
| | | throws CryptoManagerException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getMacEngineKeyEntryID(final String macAlgorithm, |
| | | final int keyLengthBits) |
| | | throws CryptoManagerException { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Mac getMacEngine(String keyEntryID) |
| | | throws CryptoManagerException |
| | | { |
| | | final MacKeyEntry keyEntry = MacKeyEntry.getKeyEntry(this, |
| | | new KeyEntryID(keyEntryID)); |
| | | return (null == keyEntry) ? null : getMacEngine(keyEntry); |
| | | return keyEntry != null ? getMacEngine(keyEntry) : null; |
| | | } |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] encrypt(byte[] data) |
| | | throws GeneralSecurityException, CryptoManagerException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] encrypt(String cipherTransformation, |
| | | int keyLengthBits, |
| | | byte[] data) |
| | |
| | | final byte[] keyID = keyEntry.getKeyID().getByteValue(); |
| | | final byte[] iv = cipher.getIV(); |
| | | final int prologueLength |
| | | = /* version */ 1 + keyID.length + ((null == iv) ? 0 : iv.length); |
| | | = /* version */ 1 + keyID.length + (iv != null ? iv.length : 0); |
| | | final int dataLength = cipher.getOutputSize(data.length); |
| | | final byte[] cipherText = new byte[prologueLength + dataLength]; |
| | | int writeIndex = 0; |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public CipherOutputStream getCipherOutputStream( |
| | | OutputStream outputStream) throws CryptoManagerException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public CipherOutputStream getCipherOutputStream( |
| | | String cipherTransformation, int keyLengthBits, |
| | | OutputStream outputStream) |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] decrypt(byte[] data) |
| | | throws GeneralSecurityException, |
| | | CryptoManagerException |
| | |
| | | |
| | | final Cipher cipher = getCipher(keyEntry, Cipher.DECRYPT_MODE, iv); |
| | | if(data.length - readIndex > 0) |
| | | { |
| | | return cipher.doFinal(data, readIndex, data.length - readIndex); |
| | | else { |
| | | //IBM Java 6 throws an IllegalArgumentException when there's n |
| | | } |
| | | else |
| | | { |
| | | // IBM Java 6 throws an IllegalArgumentException when there's no |
| | | // data to process. |
| | | return cipher.doFinal(); |
| | | } |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public CipherInputStream getCipherInputStream( |
| | | InputStream inputStream) throws CryptoManagerException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int compress(byte[] src, int srcOff, int srcLen, |
| | | byte[] dst, int dstOff, int dstLen) |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int uncompress(byte[] src, int srcOff, int srcLen, |
| | | byte[] dst, int dstOff, int dstLen) |
| | | throws DataFormatException |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public SSLContext getSslContext(String sslCertNickname) |
| | | throws ConfigException |
| | | { |
| | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getSslCertNickname() |
| | | { |
| | | return sslCertNickname; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isSslEncryption() |
| | | { |
| | | return sslEncryption; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public SortedSet<String> getSslProtocols() |
| | | { |
| | | return sslProtocols; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public SortedSet<String> getSslCipherSuites() |
| | | { |
| | | return sslCipherSuites; |