Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
The BSD License Copyright (c) 2010-2012 RIPE NCC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the RIPE NCC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package net.ripe.rpki.commons.crypto.x509cert;
 
 
 import java.net.URI;
 import java.util.List;
 
 import static net.ripe.rpki.commons.crypto.x509cert.X509CertificateBuilderHelper.*;
 
 public abstract class AbstractX509CertificateWrapper implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
     public static final ASN1ObjectIdentifier POLICY_OID = new ASN1ObjectIdentifier("1.3.6.1.5.5.7.14.2");
 
     public static final PolicyInformation POLICY_INFORMATION = new PolicyInformation();
 
     private final X509Certificate certificate;
 
 
     protected AbstractX509CertificateWrapper(X509Certificate certificate) {
         Validate.notNull(certificate);
         this. = certificate;
     }
 
     public X509Certificate getCertificate() {
         return ;
     }
 
     public byte[] getEncoded() {
         try {
             return .getEncoded();
         } catch (CertificateEncodingException e) {
             throw new AbstractX509CertificateWrapperException(e);
         }
     }
 
         return ;
     }
 
    @Override
    public int hashCode() {
        return .hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof AbstractX509CertificateWrapper)) {
            return false;
        }
        final AbstractX509CertificateWrapper other = (AbstractX509CertificateWrapperobj;
        return .equals(other.certificate);
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this.).append("serial"getSerialNumber()).append("subject"getSubject()).toString();
    }
    public boolean isEe() {
        return X509CertificateUtil.isEe();
    }
    public boolean isCa() {
        return X509CertificateUtil.isCa();
    }
    public boolean isRoot() {
        return X509CertificateUtil.isRoot();
    }
    public URI getManifestUri() {
        return X509CertificateUtil.getManifestUri();
    }
    public URI getRepositoryUri() {
        return X509CertificateUtil.getRepositoryUri();
    }
    public boolean isObjectIssuer() {
        return X509CertificateUtil.isObjectIssuer();
    }
    public byte[] getSubjectKeyIdentifier() {
        return X509CertificateUtil.getSubjectKeyIdentifier();
    }
    public byte[] getAuthorityKeyIdentifier() {
        return X509CertificateUtil.getAuthorityKeyIdentifier();
    }
    public X500Principal getSubject() {
        return X509CertificateUtil.getSubject();
    }
    public X500Principal getIssuer() {
        return X509CertificateUtil.getIssuer();
    }
    public PublicKey getPublicKey() {
        return X509CertificateUtil.getPublicKey();
    }
    public ValidityPeriod getValidityPeriod() {
        return X509CertificateUtil.getValidityPeriod();
    }
    public BigInteger getSerialNumber() {
        return X509CertificateUtil.getSerialNumber();
    }
        return X509CertificateUtil.getAuthorityInformationAccess();
    }
        return X509CertificateUtil.findFirstAuthorityInformationAccessByMethod(method);
    }
        return X509CertificateUtil.getSubjectInformationAccess();
    }
        return X509CertificateUtil.findFirstSubjectInformationAccessByMethod(method);
    }
    public URI[] getCrlDistributionPoints() {
        return X509CertificateUtil.getCrlDistributionPoints();
    }
        return X509CertificateUtil.findFirstRsyncCrlDistributionPoint();
    }
    public void verify(PublicKey publicKeythrows InvalidKeyExceptionSignatureException {
        X509CertificateUtil.verify(publicKey);
    }
New to GrepCode? Check out our FAQ X