List of usage examples for org.bouncycastle.asn1.x509 NameConstraints getEncoded
public byte[] getEncoded(String encoding) throws IOException
From source file:net.sf.keystore_explorer.gui.dialogs.extensions.DNameConstraints.java
License:Open Source License
private void okPressed() { List<GeneralSubtree> permittedSubtrees = jgsPermittedSubtrees.getGeneralSubtrees().getGeneralSubtrees(); List<GeneralSubtree> excludedSubtrees = jgsExcludedSubtrees.getGeneralSubtrees().getGeneralSubtrees(); GeneralSubtree[] permittedSubtreesArray = permittedSubtrees .toArray(new GeneralSubtree[permittedSubtrees.size()]); GeneralSubtree[] excludedSubtreesArray = excludedSubtrees .toArray(new GeneralSubtree[excludedSubtrees.size()]); NameConstraints nameConstraints = new NameConstraints(permittedSubtreesArray, excludedSubtreesArray); try {//w w w . j a va 2 s . c o m value = nameConstraints.getEncoded(ASN1Encoding.DER); } catch (IOException ex) { DError dError = new DError(this, ex); dError.setLocationRelativeTo(this); dError.setVisible(true); return; } closeDialog(); }