Search in sources :

Example 21 with DERIA5String

use of com.github.zhenwei.core.asn1.DERIA5String in project keystore-explorer by kaikramer.

the class DNetscapeCertificateRenewalUrl method okPressed.

private void okPressed() {
    String netscapeCertificateRenewalUrlStr = jtfNetscapeCertificateRenewalUrl.getText().trim();
    if (netscapeCertificateRenewalUrlStr.length() == 0) {
        JOptionPane.showMessageDialog(this, res.getString("DNetscapeCertificateRenewalUrl.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
        return;
    }
    DERIA5String netscapeCertificateRenewalUrl = new DERIA5String(netscapeCertificateRenewalUrlStr);
    try {
        value = netscapeCertificateRenewalUrl.getEncoded(ASN1Encoding.DER);
    } catch (IOException ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
        return;
    }
    closeDialog();
}
Also used : DERIA5String(org.bouncycastle.asn1.DERIA5String) DERIA5String(org.bouncycastle.asn1.DERIA5String) IOException(java.io.IOException) DError(org.kse.gui.error.DError)

Example 22 with DERIA5String

use of com.github.zhenwei.core.asn1.DERIA5String in project keystore-explorer by kaikramer.

the class DNetscapeComment method prepopulateWithValue.

private void prepopulateWithValue(byte[] value) throws IOException {
    DERIA5String netscapeComment = DERIA5String.getInstance(value);
    jtaNetscapeComment.setText(netscapeComment.getString());
    jtaNetscapeComment.setCaretPosition(0);
}
Also used : DERIA5String(org.bouncycastle.asn1.DERIA5String)

Example 23 with DERIA5String

use of com.github.zhenwei.core.asn1.DERIA5String in project keystore-explorer by kaikramer.

the class DNetscapeRevocationUrl method prepopulateWithValue.

private void prepopulateWithValue(byte[] value) throws IOException {
    DERIA5String netscapeRevocationUrl = DERIA5String.getInstance(value);
    jtfNetscapeRevocationUrl.setText(netscapeRevocationUrl.getString());
    jtfNetscapeRevocationUrl.setCaretPosition(0);
}
Also used : DERIA5String(org.bouncycastle.asn1.DERIA5String)

Example 24 with DERIA5String

use of com.github.zhenwei.core.asn1.DERIA5String in project keystore-explorer by kaikramer.

the class DNetscapeRevocationUrl method okPressed.

private void okPressed() {
    String netscapeRevocationUrlStr = jtfNetscapeRevocationUrl.getText().trim();
    if (netscapeRevocationUrlStr.length() == 0) {
        JOptionPane.showMessageDialog(this, res.getString("DNetscapeRevocationUrl.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
        return;
    }
    DERIA5String netscapeRevocationUrl = new DERIA5String(netscapeRevocationUrlStr);
    try {
        value = netscapeRevocationUrl.getEncoded(ASN1Encoding.DER);
    } catch (IOException ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
        return;
    }
    closeDialog();
}
Also used : DERIA5String(org.bouncycastle.asn1.DERIA5String) DERIA5String(org.bouncycastle.asn1.DERIA5String) IOException(java.io.IOException) DError(org.kse.gui.error.DError)

Example 25 with DERIA5String

use of com.github.zhenwei.core.asn1.DERIA5String in project keystore-explorer by kaikramer.

the class DNetscapeSslServerName method prepopulateWithValue.

private void prepopulateWithValue(byte[] value) throws IOException {
    DERIA5String netscapeSslServerName = DERIA5String.getInstance(value);
    jtfNetscapeSslServerName.setText(netscapeSslServerName.getString());
    jtfNetscapeSslServerName.setCaretPosition(0);
}
Also used : DERIA5String(org.bouncycastle.asn1.DERIA5String)

Aggregations

DERIA5String (org.bouncycastle.asn1.DERIA5String)80 IOException (java.io.IOException)55 GeneralName (org.bouncycastle.asn1.x509.GeneralName)29 DEROctetString (org.bouncycastle.asn1.DEROctetString)22 ASN1ObjectIdentifier (org.bouncycastle.asn1.ASN1ObjectIdentifier)21 DERSequence (org.bouncycastle.asn1.DERSequence)17 DERUTF8String (org.bouncycastle.asn1.DERUTF8String)16 ASN1Primitive (org.bouncycastle.asn1.ASN1Primitive)15 ASN1EncodableVector (org.bouncycastle.asn1.ASN1EncodableVector)14 ASN1Sequence (org.bouncycastle.asn1.ASN1Sequence)14 ASN1Encodable (org.bouncycastle.asn1.ASN1Encodable)12 DERBitString (org.bouncycastle.asn1.DERBitString)12 SignatureException (java.security.SignatureException)10 ArrayList (java.util.ArrayList)10 DERTaggedObject (org.bouncycastle.asn1.DERTaggedObject)10 GeneralNames (org.bouncycastle.asn1.x509.GeneralNames)10 HashSet (java.util.HashSet)9 DERPrintableString (org.bouncycastle.asn1.DERPrintableString)9 OperatorCreationException (org.bouncycastle.operator.OperatorCreationException)9 ASN1InputStream (org.bouncycastle.asn1.ASN1InputStream)8