@Override protected void getValues(Object object, Object[] values) { OtherName on = (OtherName) object; values[0] = ObjectIdentifier.toIntArray(on.typeID); values[1] = on.value; } };
@Override protected void getValues(Object object, Object[] values) { AccessDescription ad = (AccessDescription) object; values[0] = ObjectIdentifier.toIntArray(ad.accessMethod); values[1] = ad.accessLocation; } };
public Extension(String extnID, boolean critical, byte[] extnValue) { this.extnID_str = extnID; this.extnID = ObjectIdentifier.toIntArray(extnID); this.critical = critical; this.extnValue = extnValue; }
/** * Returns whether the given string is a valid ObjectIdentifier * (OID) representation. * * String representation is defined as for {@link #toIntArray}. * * @param str string representation of OID * @return true if oidString has valid syntax or false if not */ public static boolean isOID(String str) { return toIntArray(str, false) != null; }
@Override protected void getValues(Object object, Object[] values) { PolicyInformation pi = (PolicyInformation) object; values[0] = ObjectIdentifier.toIntArray(pi.policyIdentifier); } };
/** * Creates ObjectIdentifier(OID) from string representation. * * @param strOid oid string * @throws IllegalArgumentException if oid string is invalid or null */ public ObjectIdentifier(String strOid) { this.oid = toIntArray(strOid); this.soid = strOid; }
/** * Gets ObjectIdentifier (OID) from string representation. * * String representation is defined by the following syntax: * OID = subidentifier 1*("." subidentifier) * subidentifier = 1*(digit) * * @param str string representation of OID * @return oid as array of integers * @throws IllegalArgumentException if oid string is invalid or null */ public static int[] toIntArray(String str) { return toIntArray(str, true); }
protected void getValues(Object object, Object[] values) { TimeStampReq req = (TimeStampReq) object; values[0] = ASN1Integer.fromIntValue(req.version); values[1] = req.messageImprint; values[2] = (req.reqPolicy == null) ? null : ObjectIdentifier .toIntArray(req.reqPolicy); values[3] = (req.nonce == null) ? null : req.nonce.toByteArray(); values[4] = (req.certReq == null) ? Boolean.FALSE : req.certReq; values[5] = req.extensions; } };
@Override public void setEncodingContent(BerOutputStream out) { //FIXME this is a stub for a while out.content = ObjectIdentifier.toIntArray((String) out.content); super.setEncodingContent(out); } };
public Extension(String extnID, boolean critical, ExtensionValue extnValueObject) { this.extnID_str = extnID; this.extnID = ObjectIdentifier.toIntArray(extnID); this.critical = critical; this.extnValueObject = extnValueObject; this.valueDecoded = true; this.extnValue = extnValueObject.getEncoded(); }
protected void getValues(Object object, Object[] values) { TSTInfo info = (TSTInfo) object; values[0] = ASN1Integer.fromIntValue(info.version); values[1] = ObjectIdentifier.toIntArray(info.policy); values[2] = info.messageImprint; values[3] = info.serialNumber.toByteArray(); values[4] = info.genTime; values[5] = info.accuracy; values[6] = info.ordering; values[7] = (info.nonce == null) ? null : info.nonce.toByteArray(); values[8] = info.tsa; values[9] = info.extensions; } };
@Override protected void getValues(Object object, Object[] values) { AlgorithmIdentifier aID = (AlgorithmIdentifier) object; values[0] = ObjectIdentifier.toIntArray(aID.getAlgorithm()); values[1] = aID.getParameters(); } };
/** * Parses OID string representation. * * @param sOid * string representation of OID * * @throws IOException * if OID can not be created from its string representation */ public static ObjectIdentifier getObjectIdentifier(String sOid) throws IOException { if (sOid.charAt(0) >= '0' && sOid.charAt(0) <= '9') { int[] array = org.apache.harmony.security.asn1.ObjectIdentifier.toIntArray(sOid); ObjectIdentifier thisOid = getOID(array); if (thisOid == null) { thisOid = new ObjectIdentifier(array); } return thisOid; } ObjectIdentifier thisOid = KNOWN_NAMES.get(sOid.toUpperCase(Locale.US)); if (thisOid == null) { throw new IOException("Unrecognizable attribute name: " + sOid); } return thisOid; }
public Extension(String extnID, boolean critical, byte[] extnValue) { this.extnID_str = extnID; this.extnID = ObjectIdentifier.toIntArray(extnID); this.critical = critical; this.extnValue = extnValue; }
/** * Creates ObjectIdentifier(OID) from string representation. * * @param strOid oid string * @throws IllegalArgumentException if oid string is invalid or null */ public ObjectIdentifier(String strOid) { this.oid = toIntArray(strOid); this.soid = strOid; }
@Override protected void getValues(Object object, Object[] values) { AccessDescription ad = (AccessDescription) object; values[0] = ObjectIdentifier.toIntArray(ad.accessMethod); values[1] = ad.accessLocation; } };
protected void getValues(Object object, Object[] values) { TimeStampReq req = (TimeStampReq) object; values[0] = ASN1Integer.fromIntValue(req.version); values[1] = req.messageImprint; values[2] = (req.reqPolicy == null) ? null : ObjectIdentifier .toIntArray(req.reqPolicy); values[3] = (req.nonce == null) ? null : req.nonce.toByteArray(); values[4] = (req.certReq == null) ? Boolean.FALSE : req.certReq; values[5] = req.extensions; } };
public Extension(String extnID, boolean critical, ExtensionValue extnValueObject) { this.extnID_str = extnID; this.extnID = ObjectIdentifier.toIntArray(extnID); this.critical = critical; this.extnValueObject = extnValueObject; this.valueDecoded = true; this.extnValue = extnValueObject.getEncoded(); }
@Override public void setEncodingContent(BerOutputStream out) { //FIXME this is a stub for a while out.content = ObjectIdentifier.toIntArray((String) out.content); super.setEncodingContent(out); } };
public Extension(String extnID, boolean critical, ExtensionValue extnValueObject) { this.extnID_str = extnID; this.extnID = ObjectIdentifier.toIntArray(extnID); this.critical = critical; this.extnValueObject = extnValueObject; this.valueDecoded = true; this.extnValue = extnValueObject.getEncoded(); }