org.xwiki.crypto.pkix.params.x509certificate.X509CertifiedPublicKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xwiki-commons-crypto-pkix Show documentation
Show all versions of xwiki-commons-crypto-pkix Show documentation
Provides X.509 certificates management
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.xwiki.crypto.pkix.params.x509certificate;
import java.math.BigInteger;
import java.util.Date;
import org.xwiki.crypto.pkix.params.CertifiedPublicKey;
import org.xwiki.crypto.pkix.params.x509certificate.extension.X509Extensions;
/**
* Certified binding of a principal to a public key using an X.509 Certificate.
*
* @version $Id: f8bc5f731ff68468b837f509be9698ff6c2ce400 $
* @since 5.4
*/
public interface X509CertifiedPublicKey extends CertifiedPublicKey
{
/**
* @return the date after which this certificate is not valid.
*/
Date getNotAfter();
/**
* @return the date before which this certificate is not valid.
*/
Date getNotBefore();
/**
* @return the X.509 version of the certificate (1, 2 or 3).
*/
int getVersionNumber();
/**
* @return the serial number of the certificate.
*/
BigInteger getSerialNumber();
/**
* Check that the certificate is valid on the given date.
*
* @param date the date to be checked.
* @return true if the certificate is valid for the given date.
*/
boolean isValidOn(Date date);
/**
* @return true if this certificate is a CA certificate.
* @since 6.0M1
*/
boolean isRootCA();
/**
* @return X.509 extension.
*/
X509Extensions getExtensions();
/**
* @return the authority key identifier, or null of not available.
*/
byte[] getAuthorityKeyIdentifier();
/**
* @return the subject key identifier, or null of not available.
*/
byte[] getSubjectKeyIdentifier();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy