/** * @return maximum of values in the enum */ public static int getMaxValue() { if (maxValue == 0) { for (PKIFailureInfo cur : values()) if (cur.value > maxValue) { maxValue = cur.value; } } return maxValue; }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new MessageImprint( (AlgorithmIdentifier)values[0], (byte[])values[1]); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new TimeStampResp( (PKIStatusInfo) values[0], (ContentInfo) values[1]); }
protected void getValues(Object object, Object[] values) { PKIStatusInfo psi = (PKIStatusInfo) object; values[0] = BigInteger.valueOf(psi.status.getStatus()) .toByteArray(); values[1] = psi.statusString; if (psi.failInfo != null) { // set the needed bit in the bit string boolean[] failInfoBoolArray = new boolean[PKIFailureInfo .getMaxValue()]; failInfoBoolArray[psi.failInfo.getValue()] = true; values[2] = new BitString(failInfoBoolArray); } else { values[2] = null; } }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; int failInfoValue = -1; if (values[2] != null) { boolean[] failInfoBoolArray = ((BitString) values[2]).toBooleanArray(); for (int i = 0; i < failInfoBoolArray.length; i++) { if (failInfoBoolArray[i]) { failInfoValue = i; break; } } } return new PKIStatusInfo( PKIStatus.getInstance(ASN1Integer.toIntValue(values[0])), (List)values[1], PKIFailureInfo.getInstance(failInfoValue)); } };
public static PKIStatus getInstance(int status) { for (PKIStatus curStatus : values()) { if (status == curStatus.status) { return curStatus; } } throw new InvalidParameterException("Unknown PKIStatus value"); } }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; BigInteger nonce = (values[7] == null) ? null : new BigInteger( (byte[]) values[7]); return new TSTInfo( ASN1Integer.toIntValue(values[0]), ObjectIdentifier.toString((int[]) values[1]), (MessageImprint) values[2], new BigInteger((byte[]) values[3]), (Date) values[4], (int []) values[5], (Boolean) values[6], nonce, (GeneralName) values[8], (Extensions) values[9]); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; String objID = (values[2] == null) ? null : ObjectIdentifier .toString((int[]) values[2]); BigInteger nonce = (values[3] == null) ? null : new BigInteger( (byte[]) values[3]); if (values[5] == null) { return new TimeStampReq( ASN1Integer.toIntValue(values[0]), (MessageImprint) values[1], objID, nonce, (Boolean) values[4], null, in.getEncoded() ); } else { return new TimeStampReq( ASN1Integer.toIntValue(values[0]), (MessageImprint) values[1], objID, nonce, (Boolean) values[4], (Extensions) values[5], in.getEncoded() ); } }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new TimeStampResp( (PKIStatusInfo) values[0], (ContentInfo) values[1]); }
/** * @param value * @return */ public static PKIFailureInfo getInstance(int value) { for (PKIFailureInfo info : values()){ if (value == info.value) { return info; } } throw new InvalidParameterException("Unknown PKIFailureInfo value"); } }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new MessageImprint( (AlgorithmIdentifier)values[0], (byte[])values[1]); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new TimeStampResp( (PKIStatusInfo) values[0], (ContentInfo) values[1]); }
/** * @return maximum of values in the enum */ public static int getMaxValue() { if (maxValue == 0) { for (PKIFailureInfo cur : values()) if (cur.value > maxValue) { maxValue = cur.value; } } return maxValue; }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new MessageImprint( (AlgorithmIdentifier)values[0], (byte[])values[1]); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new TimeStampResp( (PKIStatusInfo) values[0], (ContentInfo) values[1]); }
/** * @return maximum of values in the enum */ public static int getMaxValue() { if (maxValue == 0) { for (PKIFailureInfo cur : values()) if (cur.value > maxValue) { maxValue = cur.value; } } return maxValue; }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new MessageImprint( (AlgorithmIdentifier)values[0], (byte[])values[1]); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new TimeStampResp( (PKIStatusInfo) values[0], (ContentInfo) values[1]); }
/** * @return maximum of values in the enum */ public static int getMaxValue() { if (maxValue == 0) { for (PKIFailureInfo cur : values()) if (cur.value > maxValue) { maxValue = cur.value; } } return maxValue; }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new TimeStampResp( (PKIStatusInfo) values[0], (ContentInfo) values[1]); }