1 /* 2 * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.] 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.opensaml.xml.security.x509; 18 19 import java.security.cert.X509CRL; 20 import java.security.cert.X509Certificate; 21 import java.util.Collection; 22 23 import org.opensaml.xml.security.credential.Credential; 24 25 /** 26 * An entity credential based on key material and other information (e.g. certificates and certificate 27 * revocation lists) associated with X.509 Public Key Infrastructure. 28 * 29 * Note that this type of credential may not contain a symmetric (secret) key, and hence 30 * {@link Credential#getSecretKey()} should always return null. 31 */ 32 public interface X509Credential extends Credential { 33 34 /** 35 * Gets the public certificate for the entity. The public key of this certificate will be 36 * the same key obtained from {@link Credential#getPublicKey()}. 37 * 38 * @return the public certificate for the entity 39 */ 40 public X509Certificate getEntityCertificate(); 41 42 /** 43 * Gets an immutable collection of certificates in the entity's trust chain. The entity certificate is contained 44 * within this list. No specific ordering of the certificates is guaranteed. 45 * 46 * @return entities certificate chain 47 */ 48 public Collection<X509Certificate> getEntityCertificateChain(); 49 50 /** 51 * Gets a collection of CRLs associated with the credential. 52 * 53 * @return CRLs associated with the credential 54 */ 55 public Collection<X509CRL> getCRLs(); 56 }