use of sun.security.x509.AccessDescription in project keystore-explorer by kaikramer.
the class JAccessDescriptions method addPressed.
private void addPressed() {
Container container = getTopLevelAncestor();
DAccessDescriptionChooser dAccessDescriptionChooser = null;
if (container instanceof JDialog) {
dAccessDescriptionChooser = new DAccessDescriptionChooser((JDialog) container, title, null);
dAccessDescriptionChooser.setLocationRelativeTo(container);
dAccessDescriptionChooser.setVisible(true);
} else if (container instanceof JFrame) {
dAccessDescriptionChooser = new DAccessDescriptionChooser((JFrame) container, title, null);
dAccessDescriptionChooser.setLocationRelativeTo(container);
dAccessDescriptionChooser.setVisible(true);
}
AccessDescription newAccessDescription = dAccessDescriptionChooser.getAccessDescription();
if (newAccessDescription == null) {
return;
}
accessDescriptions.add(newAccessDescription);
populate();
selectAccessDescriptionInTable(newAccessDescription);
}
use of sun.security.x509.AccessDescription in project keystore-explorer by kaikramer.
the class AccessDescriptionsTableModel method load.
/**
* Load the AccessDescriptionsTableModel with access descriptions.
*
* @param accessDescriptions
* The access descriptions
*/
public void load(List<AccessDescription> accessDescriptions) {
AccessDescription[] accessDescriptionsArray = accessDescriptions.toArray(new AccessDescription[accessDescriptions.size()]);
Arrays.sort(accessDescriptionsArray, new AccessDescriptionMethodComparator());
data = new Object[accessDescriptionsArray.length][2];
int i = 0;
for (AccessDescription accessDescription : accessDescriptionsArray) {
data[i][0] = accessDescription;
data[i][1] = accessDescription;
i++;
}
fireTableDataChanged();
}
use of sun.security.x509.AccessDescription in project keystore-explorer by kaikramer.
the class DAuthorityInformationAccess method okPressed.
private void okPressed() {
List<AccessDescription> accessDescriptions = jadAccessDescriptions.getAccessDescriptions();
if (accessDescriptions.size() == 0) {
JOptionPane.showMessageDialog(this, res.getString("DAuthorityInformationAccess.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
return;
}
ASN1EncodableVector vec = new ASN1EncodableVector();
for (AccessDescription accessDescription : accessDescriptions) {
vec.add(accessDescription);
}
AuthorityInformationAccess authorityInformationAccess = AuthorityInformationAccess.getInstance(new DERSequence(vec));
try {
value = authorityInformationAccess.getEncoded(ASN1Encoding.DER);
} catch (IOException ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
return;
}
closeDialog();
}
use of sun.security.x509.AccessDescription 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();
}
Aggregations