diff options
author | David Hook <dgh@cryptoworkshop.com> | 2014-03-25 15:07:38 +0400 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2014-03-25 15:07:38 +0400 |
commit | 6cbd4d951d11139acb519de66dcfafff1775a622 (patch) | |
tree | 438920d2d495f85e7229dafdded30dcbbf873126 /pkix/src | |
parent | 70b80f276825d91946fbc62b0b185f5a44a8b05f (diff) |
fixed compilation issue
Diffstat (limited to 'pkix/src')
-rw-r--r-- | pkix/src/test/java/org/bouncycastle/ocsp/test/OCSPTestUtil.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pkix/src/test/java/org/bouncycastle/ocsp/test/OCSPTestUtil.java b/pkix/src/test/java/org/bouncycastle/ocsp/test/OCSPTestUtil.java index 229d8604..94cd57c3 100644 --- a/pkix/src/test/java/org/bouncycastle/ocsp/test/OCSPTestUtil.java +++ b/pkix/src/test/java/org/bouncycastle/ocsp/test/OCSPTestUtil.java @@ -21,6 +21,7 @@ import org.bouncycastle.asn1.x509.SubjectKeyIdentifier; import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; import org.bouncycastle.asn1.x509.X509Extensions; import org.bouncycastle.asn1.x509.X509Name; +import org.bouncycastle.cert.bc.BcX509ExtensionUtils; import org.bouncycastle.x509.X509V3CertificateGenerator; public class OCSPTestUtil @@ -164,12 +165,7 @@ public class OCSPTestUtil private static SubjectKeyIdentifier createSubjectKeyId(PublicKey _pubKey) throws IOException { - - ByteArrayInputStream _bais = new ByteArrayInputStream(_pubKey - .getEncoded()); - SubjectPublicKeyInfo _info = new SubjectPublicKeyInfo( - (ASN1Sequence)new ASN1InputStream(_bais).readObject()); - return new SubjectKeyIdentifier(_info); + return new BcX509ExtensionUtils().createSubjectKeyIdentifier(SubjectPublicKeyInfo.getInstance(_pubKey.getEncoded())); } private static BigInteger allocateSerialNumber() |