/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* test
* @bug 6377058
* @summary SunJCE depends on sun.security.provider.SignatureImpl
* behaviour, BC can't load into 1st slot.
* @author Brad R. Wetmore
*/
implements X509Extension {
c = cert;
}
c.checkValidity();
}
c.checkValidity(date);
}
public int getVersion() {
return c.getVersion();
}
return c.getSerialNumber();
}
return c.getIssuerDN();
}
return c.getIssuerX500Principal();
}
return c.getSubjectDN();
}
return c.getSubjectX500Principal();
}
return c.getNotBefore();
}
return c.getNotAfter();
}
public byte[] getTBSCertificate()
throws CertificateEncodingException {
return c.getTBSCertificate();
}
public byte[] getSignature() {
return c.getSignature();
}
return c.getSigAlgName();
}
return c.getSigAlgOID();
}
public byte[] getSigAlgParams() {
return c.getSigAlgParams();
}
public boolean[] getIssuerUniqueID() {
return c.getIssuerUniqueID();
}
public boolean[] getSubjectUniqueID() {
return c.getSubjectUniqueID();
}
public boolean[] getKeyUsage() {
return c.getKeyUsage();
}
throws CertificateParsingException {
return c.getExtendedKeyUsage();
}
public int getBasicConstraints() {
return c.getBasicConstraints();
}
throws CertificateParsingException {
return c.getSubjectAlternativeNames();
}
throws CertificateParsingException {
return c.getIssuerAlternativeNames();
}
/*
* The following are from X509Extension
*/
public boolean hasUnsupportedCriticalExtension() {
return c.hasUnsupportedCriticalExtension();
}
return c.getCriticalExtensionOIDs();
}
return c.getNonCriticalExtensionOIDs();
}
return c.getExtensionValue(oid);
}
/*
* The rest are from Certificate
*/
}
public int hashCode() {
return c.hashCode();
}
public byte[] getEncoded()
throws CertificateEncodingException {
return c.getEncoded();
}
try {
} catch (SignatureException e) {
throw new InvalidKeyException(
"Rethrowing as a SignatureException", e);
}
}
try {
} catch (SignatureException e) {
throw new InvalidKeyException(
"Rethrowing as a SignatureException", e);
}
}
return c.toString();
}
return c.getPublicKey();
}
}