String url = DERIA5String.getInstance(genName.getName()).getString(); crlUrls.add(url);
/** * Returns subject alternative names for "localhost". * @return the subject alternative names for "localhost". */ private static GeneralNames getLocalhostSubjectAltNames() throws UnknownHostException { InetAddress[] localAddresses = InetAddress.getAllByName("localhost"); GeneralName[] generalNames = new GeneralName[localAddresses.length + 1]; for (int i = 0; i < localAddresses.length; i++) { generalNames[i] = new GeneralName(GeneralName.iPAddress, new DEROctetString(localAddresses[i].getAddress())); } generalNames[generalNames.length - 1] = new GeneralName(GeneralName.dNSName, new DERIA5String("localhost")); return new GeneralNames(generalNames); }
/** * <pre> * SPuri ::= IA5String * </pre> */ public ASN1Primitive toASN1Primitive() { return uri.toASN1Primitive(); } }
public VerisignCzagExtension( DERIA5String str) { super(str.getString()); }
public static SPuri getInstance( Object obj) { if (obj instanceof SPuri) { return (SPuri) obj; } else if (obj instanceof DERIA5String) { return new SPuri(DERIA5String.getInstance(obj)); } return null; }
/** * Return an IA5 String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERIA5String instance, or null. */ public static DERIA5String getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERIA5String) { return getInstance(o); } else { return new DERIA5String(((ASN1OctetString)o).getOctets()); } }
private void okPressed() { String netscapeCommentStr = jtaNetscapeComment.getText().trim(); if (netscapeCommentStr.length() == 0) { JOptionPane.showMessageDialog(this, res.getString("DNetscapeComment.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE); return; } DERIA5String netscapeComment = new DERIA5String(netscapeCommentStr); try { value = netscapeComment.getEncoded(ASN1Encoding.DER); } catch (IOException e) { DError.displayError(this, e); return; } closeDialog(); }
(new DERIA5String(cps)).toASN1Primitive()); } else { UserNotice userNotice = junUserNotice.getUserNotice();
public NetscapeRevocationURL( DERIA5String str) { super(str.getString()); }
public static SPuri getInstance( Object obj) { if (obj instanceof SPuri) { return (SPuri) obj; } else if (obj instanceof DERIA5String) { return new SPuri(DERIA5String.getInstance(obj)); } return null; }
/** * return an IA5 String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERIA5String instance, or null. */ public static DERIA5String getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERIA5String) { return getInstance(o); } else { return new DERIA5String(((ASN1OctetString)o).getOctets()); } }
private void okPressed() { String netscapeBaseUrlStr = jtfNetscapeBaseUrl.getText().trim(); if (netscapeBaseUrlStr.length() == 0) { JOptionPane.showMessageDialog(this, res.getString("DNetscapeBaseUrl.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE); return; } DERIA5String netscapeBaseUrl = new DERIA5String(netscapeBaseUrlStr); try { value = netscapeBaseUrl.getEncoded(ASN1Encoding.DER); } catch (IOException e) { DError.displayError(this, e); return; } closeDialog(); }
private void prepopulateWithValue(byte[] value) throws IOException { DERIA5String netscapeComment = DERIA5String.getInstance(value); jtaNetscapeComment.setText(netscapeComment.getString()); jtaNetscapeComment.setCaretPosition(0); }
public NetscapeRevocationURL( DERIA5String str) { super(str.getString()); }
/** * Creates a new <code>PolicyQualifierInfo</code> containing a * cPSuri qualifier. * * @param cps the CPS (certification practice statement) uri as a * <code>String</code>. */ public PolicyQualifierInfo( String cps) { policyQualifierId = PolicyQualifierId.id_qt_cps; qualifier = new DERIA5String (cps); }
private BiometricData(ASN1Sequence seq) { Enumeration e = seq.getObjects(); // typeOfBiometricData typeOfBiometricData = TypeOfBiometricData.getInstance(e.nextElement()); // hashAlgorithm hashAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement()); // biometricDataHash biometricDataHash = ASN1OctetString.getInstance(e.nextElement()); // sourceDataUri if (e.hasMoreElements()) { sourceDataUri = DERIA5String.getInstance(e.nextElement()); } }
private void okPressed() { String netscapeCaRevocationUrlStr = jtfNetscapeCaRevocationUrl.getText().trim(); if (netscapeCaRevocationUrlStr.length() == 0) { JOptionPane.showMessageDialog(this, res.getString("DNetscapeCaRevocationUrl.ValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE); return; } DERIA5String netscapeCaRevocationUrl = new DERIA5String(netscapeCaRevocationUrlStr); try { value = netscapeCaRevocationUrl.getEncoded(ASN1Encoding.DER); } catch (IOException e) { DError.displayError(this, e); return; } closeDialog(); }
/** * <pre> * SPuri ::= IA5String * </pre> */ public ASN1Primitive toASN1Primitive() { return uri.toASN1Primitive(); } }
private String getNetscapeSslServerNameStringValue(byte[] value) throws IOException { // @formatter:off /* NetscapeSslServerName ::= DERIA5String */ // @formatter:on StringBuilder sb = new StringBuilder(); DERIA5String netscapeSslServerName = DERIA5String.getInstance(value); sb.append(netscapeSslServerName.getString()); sb.append(NEWLINE); return sb.toString(); }
public String toString() { return getString(); }