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 2006-2008 Sun Microsystems, Inc.
025 *      Portions copyright 2012 ForgeRock AS.
026 */
027
028package org.opends.server.extensions;
029
030
031
032import java.nio.channels.ByteChannel;
033import java.security.cert.Certificate;
034
035
036
037/**
038 * This interface can be used to define connection security providers.
039 */
040public interface ConnectionSecurityProvider
041{
042
043  /**
044   * Return a certificate chain array.
045   *
046   * @return A certificate chain array.
047   */
048  Certificate[] getClientCertificateChain();
049
050
051
052  /**
053   * Return the name of a provider.
054   *
055   * @return String representing the name of a provider.
056   */
057  String getName();
058
059
060
061  /**
062   * Return a Security Strength Factor.
063   *
064   * @return Integer representing the current SSF of a provider.
065   */
066  int getSSF();
067
068
069
070  /**
071   * Return <CODE>true</CODE> if a provider is secure.
072   *
073   * @return <CODE>true</CODE> if a provider is secure.
074   */
075  boolean isSecure();
076
077
078
079  /**
080   * Returns the security provider's byte channel.
081   *
082   * @return The security provider's byte channel.
083   */
084  ByteChannel getChannel();
085}