use of org.jruby.ext.openssl.X509Extension in project jruby-openssl by jruby.
the class X509ExtensionFactory method parseIssuerAltName.
private ASN1Encodable parseIssuerAltName(final ThreadContext context, final String valuex) throws IOException {
if (valuex.startsWith("issuer:copy")) {
RubyArray exts = (RubyArray) getInstanceVariable("@issuer_certificate").callMethod(context, "extensions");
for (int i = 0; i < exts.size(); i++) {
X509Extension ext = (X509Extension) exts.entry(i);
final String oid = ext.getRealObjectID().getId();
if ("2.5.29.17".equals(oid))
return ext.getRealValue();
}
}
throw new IOException("Malformed IssuerAltName: " + valuex);
}
Aggregations