Search in sources :

Example 1 with SubjectInfoAccess

use of org.kse.crypto.x509.SubjectInfoAccess in project keystore-explorer by kaikramer.

the class DSubjectInformationAccess method prepopulateWithValue.

private void prepopulateWithValue(byte[] value) throws IOException {
    SubjectInfoAccess subjectInformationAccess = SubjectInfoAccess.getInstance(value);
    jadAccessDescriptions.setAccessDescriptions(subjectInformationAccess.getAccessDescriptionList());
}
Also used : SubjectInfoAccess(org.kse.crypto.x509.SubjectInfoAccess)

Example 2 with SubjectInfoAccess

use of org.kse.crypto.x509.SubjectInfoAccess in project keystore-explorer by kaikramer.

the class DSubjectInformationAccess method okPressed.

private void okPressed() {
    List<AccessDescription> accessDescriptions = jadAccessDescriptions.getAccessDescriptions();
    if (accessDescriptions.size() == 0) {
        JOptionPane.showMessageDialog(this, res.getString("DSubjectInformationAccess.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
        return;
    }
    SubjectInfoAccess subjectInformationAccess = new SubjectInfoAccess(accessDescriptions);
    try {
        value = subjectInformationAccess.getEncoded(ASN1Encoding.DER);
    } catch (IOException ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
        return;
    }
    closeDialog();
}
Also used : AccessDescription(org.bouncycastle.asn1.x509.AccessDescription) SubjectInfoAccess(org.kse.crypto.x509.SubjectInfoAccess) IOException(java.io.IOException) DError(org.kse.gui.error.DError)

Aggregations

SubjectInfoAccess (org.kse.crypto.x509.SubjectInfoAccess)2 IOException (java.io.IOException)1 AccessDescription (org.bouncycastle.asn1.x509.AccessDescription)1 DError (org.kse.gui.error.DError)1