Ejemplo n.º 1
0
 private static TimeStampResp readTimeStampResp(
     Asn1InputStream input)
 {
     try
     {
         return(TimeStampResp.GetInstance(input.ReadObject()));
     }
     catch (ArgumentException e)
     {
         throw new TspException("malformed timestamp response: " + e, e);
     }
     catch (InvalidCastException e)
     {
         throw new TspException("malformed timestamp response: " + e, e);
     }
     catch (EndOfStreamException e)
     {
         //jbonilla - TSA del BCE por alguna razón devuelve "null\n"
         string resp = "";
         if (input.CanSeek && input.CanRead && input.Length > 0)
         {
             input.Seek(0, SeekOrigin.Begin);
             resp = Strings.FromByteArray(
                 Org.BouncyCastle.Utilities.IO.Streams.ReadAll(input));
         }
         throw new TspException("malformed timestamp response: "
                                + resp + " " + e.Message, e);
     }
 }
 private static TimeStampResp readTimeStampResp(Asn1InputStream input)
 {
     try
     {
         return(TimeStampResp.GetInstance(input.ReadObject()));
     }
     catch (ArgumentException ex)
     {
         throw new TspException("malformed timestamp response: " + ex, ex);
     }
     catch (InvalidCastException ex2)
     {
         throw new TspException("malformed timestamp response: " + ex2, ex2);
     }
 }
Ejemplo n.º 3
0
 private static TimeStampResp readTimeStampResp(Asn1InputStream input)
 {
     //IL_000f: Expected O, but got Unknown
     //IL_0022: Expected O, but got Unknown
     try
     {
         return(TimeStampResp.GetInstance(input.ReadObject()));
     }
     catch (ArgumentException val)
     {
         ArgumentException val2 = val;
         throw new TspException(string.Concat((object)"malformed timestamp response: ", (object)val2), (global::System.Exception)(object) val2);
     }
     catch (InvalidCastException val3)
     {
         InvalidCastException val4 = val3;
         throw new TspException(string.Concat((object)"malformed timestamp response: ", (object)val4), (global::System.Exception)(object) val4);
     }
 }