Search in sources :

Example 11 with PolicyMappings

use of org.bouncycastle.asn1.x509.PolicyMappings in project keystore-explorer by kaikramer.

the class DPolicyMappings method okPressed.

private void okPressed() {
    PolicyMappings policyMappings = jpmPolicyMappings.getPolicyMappings();
    ASN1Sequence policyMappingsSeq = (ASN1Sequence) policyMappings.toASN1Primitive();
    if (policyMappingsSeq.size() == 0) {
        JOptionPane.showMessageDialog(this, res.getString("DPolicyMappings.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
        return;
    }
    try {
        value = policyMappings.getEncoded(ASN1Encoding.DER);
    } catch (IOException ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
        return;
    }
    closeDialog();
}
Also used : ASN1Sequence(org.bouncycastle.asn1.ASN1Sequence) JPolicyMappings(org.kse.gui.crypto.policymapping.JPolicyMappings) PolicyMappings(org.bouncycastle.asn1.x509.PolicyMappings) IOException(java.io.IOException) DError(org.kse.gui.error.DError)

Example 12 with PolicyMappings

use of org.bouncycastle.asn1.x509.PolicyMappings in project keystore-explorer by kaikramer.

the class JPolicyMappings method populate.

private void populate() {
    if (policyMappings == null) {
        policyMappings = new PolicyMappings(new CertPolicyId[0], new CertPolicyId[0]);
    }
    reloadPolicyMappingsTable();
    selectFirstPolicyMappingInTable();
    updateButtonControls();
}
Also used : CertPolicyId(org.bouncycastle.asn1.x509.CertPolicyId) PolicyMappings(org.bouncycastle.asn1.x509.PolicyMappings)

Aggregations

ASN1ObjectIdentifier (org.bouncycastle.asn1.ASN1ObjectIdentifier)6 ASN1Sequence (org.bouncycastle.asn1.ASN1Sequence)6 PolicyMappings (org.bouncycastle.asn1.x509.PolicyMappings)5 ASN1Encodable (org.bouncycastle.asn1.ASN1Encodable)4 CertPolicyId (org.bouncycastle.asn1.x509.CertPolicyId)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 DERIA5String (org.bouncycastle.asn1.DERIA5String)2 DEROctetString (org.bouncycastle.asn1.DEROctetString)2 DERPrintableString (org.bouncycastle.asn1.DERPrintableString)2 DERUTF8String (org.bouncycastle.asn1.DERUTF8String)2 DirectoryString (org.bouncycastle.asn1.x500.DirectoryString)2 CRLDistPoint (org.bouncycastle.asn1.x509.CRLDistPoint)2 DistributionPoint (org.bouncycastle.asn1.x509.DistributionPoint)2 Extension (org.bouncycastle.asn1.x509.Extension)2 PolicyMappings (org.xipki.ca.certprofile.x509.jaxb.PolicyMappings)2 IOException (java.io.IOException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 Date (java.util.Date)1