byte[] authorityExtensionValue = ext.getExtensionValue(Extension.authorityInfoAccess.getId()); if (authorityExtensionValue == null)
protected static ASN1Object getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
private void populateExtensionTypes() { // Population is the supported set minus those already added ArrayList<X509ExtensionType> availableExtensions = new ArrayList<>(); for (X509ExtensionType extentionType : SUPPORTED_EXTENSIONS) { if (extensions.getExtensionValue(extentionType.oid()) == null) { availableExtensions.add(extentionType); } } jltExtensionTypes.setListData(availableExtensions.toArray(new X509ExtensionType[availableExtensions.size()])); if (!availableExtensions.isEmpty()) { jltExtensionTypes.setSelectedIndex(0); } }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
/** * Extract the value of the given extension, if it exists. * * @param ext The extension object. * @param oid The object identifier to obtain. * @throws AnnotatedException if the extension cannot be read. */ protected static ASN1Primitive getExtensionValue( java.security.cert.X509Extension ext, String oid) throws AnnotatedException { byte[] bytes = ext.getExtensionValue(oid); if (bytes == null) { return null; } return getObject(oid, bytes); }
byte[] value = extensions.getExtensionValue(extOid); byte[] value = extensions.getExtensionValue(extOid);
private ASN1Encodable getExtensionValue(X509Extension extensions, String oid) throws CryptoException { byte[] octets = ASN1OctetString.getInstance(extensions.getExtensionValue(oid)).getOctets(); try (ASN1InputStream ais = new ASN1InputStream(octets)) { return ais.readObject(); } catch (IOException ex) { throw new CryptoException(res.getString("CertificateGenFailed.exception.message"), ex); } } }
private void updateExtensionValue() { int selectedRow = jtExtensions.getSelectedRow(); if (selectedRow == -1) { jepExtensionValue.setText(""); jbAsn1.setEnabled(false); } else { String oid = ((ASN1ObjectIdentifier) jtExtensions.getValueAt(selectedRow, 2)).getId(); byte[] value = extensions.getExtensionValue(oid); boolean criticality = (Boolean) jtExtensions.getValueAt(selectedRow, 0); X509Ext ext = new X509Ext(oid, value, criticality); try { jepExtensionValue.setText("<html><body>" + ext.getStringValue() .replace(X509Ext.INDENT.getIndentChar().toString(), " ") .replace(X509Ext.NEWLINE, "<br/>") + "</body></html>"); } catch (Exception e) { jepExtensionValue.setText(""); DError.displayError(this, e); } jepExtensionValue.setCaretPosition(0); jbAsn1.setEnabled(true); } }
byte[] extPolicyBytes = cert.getExtensionValue(CERTIFICATE_POLICY_OID); if (extPolicyBytes == null) { return null;
private void asn1DumpPressed() { int selectedRow = jtExtensions.getSelectedRow(); if (selectedRow == -1) { return; } String oid = ((ASN1ObjectIdentifier) jtExtensions.getValueAt(selectedRow, 2)).getId(); byte[] value = extensions.getExtensionValue(oid); boolean criticality = (Boolean) jtExtensions.getValueAt(selectedRow, 0); X509Ext extension = new X509Ext(oid, value, criticality); try { DViewAsn1Dump dViewAsn1Dump = new DViewAsn1Dump(this, extension); dViewAsn1Dump.setLocationRelativeTo(this); dViewAsn1Dump.setVisible(true); } catch (Asn1Exception | IOException e) { DError.displayError(this, e); } }