Package codec.asn1

Examples of codec.asn1.ASN1UTCTime


  byte[] res;

  try {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();

      encode(new DEREncoder(baos));
      res = baos.toByteArray();
      baos.close();
  } catch (IOException e) {
      throw new ASN1Exception(e.getMessage());
  }
View Full Code Here


  byte[] res;

  try {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();

      certificationRequestInfo_.encode(new DEREncoder(baos));
      res = baos.toByteArray();
      baos.close();
  } catch (IOException e) {
      throw new CorruptedCodeException("internal error: "
        + e.getMessage());
View Full Code Here

  if (registry == null) {
      registry = OIDRegistry.getGlobalOIDRegistry();
  }
  type_ = new ASN1ObjectIdentifier();
  values_ = new ASN1SetOf(new DefinedByResolver(registry, type_));

  add(type_);
  add(values_);
    }
View Full Code Here

    static public OIDRegistry getDefaultRegistry() {
  return default_;
    }

    public static void main(String[] argv) {
  OIDRegistry reg;
  int n;

  try {
      reg = PKCS12OIDRegistry.getDefaultRegistry();

      for (n = 0; n < argv.length; n++) {
    System.out.println(reg.getASN1Type(new ASN1ObjectIdentifier(
      argv[n])));
      }
  } catch (Exception e) {
      e.printStackTrace(System.err);
  }
View Full Code Here

    static public OIDRegistry getDefaultRegistry() {
  return default_;
    }

    public static void main(String[] argv) {
  OIDRegistry reg;
  int n;

  try {
      reg = PKCSRegistry.getDefaultRegistry();

      for (n = 0; n < argv.length; n++) {
    System.out.println(reg.getASN1Type(new ASN1ObjectIdentifier(
      argv[n])));
      }
  } catch (Exception e) {
      e.printStackTrace(System.err);
  }
View Full Code Here

          if (signTimeDerSequence != null) {
            ASN1Primitive derObjectIdentifier = ((ASN1Primitive) signTimeDerSequence.getObjectAt(0)).toASN1Primitive();
            ASN1Primitive derObjectValue = ((ASN1Primitive) signTimeDerSequence.getObjectAt(1)).toASN1Primitive();
            if ((derObjectIdentifier instanceof ASN1ObjectIdentifier) && (derObjectValue instanceof DERSet)) {
              DERSet set = (DERSet) derObjectValue;
              ASN1UTCTime time = (ASN1UTCTime) set.getObjectAt(0);
              signature.setDate(time.getAdjustedDate());
            }
          }

          SignerId signerId = information.getSID();
          if (signerId != null) {
View Full Code Here

          if (signTimeDerSequence != null) {
            DERObject derObjectIdentifier = ((DERObject) signTimeDerSequence.getObjectAt(0)).toASN1Object();
            DERObject derObjectValue = ((DERObject) signTimeDerSequence.getObjectAt(1)).toASN1Object();
            if ((derObjectIdentifier instanceof ASN1ObjectIdentifier) && (derObjectValue instanceof DERSet)) {
              DERSet set = (DERSet) derObjectValue;
              ASN1UTCTime time = (ASN1UTCTime) set.getObjectAt(0);
              signature.setDate(time.getAdjustedDate());
            }
          }

          SignerId signerId = information.getSID();
          if (signerId != null) {
View Full Code Here

          if (signTimeDerSequence != null) {
            ASN1Primitive derObjectIdentifier = ((ASN1Primitive) signTimeDerSequence.getObjectAt(0)).toASN1Primitive();
            ASN1Primitive derObjectValue = ((ASN1Primitive) signTimeDerSequence.getObjectAt(1)).toASN1Primitive();
            if ((derObjectIdentifier instanceof ASN1ObjectIdentifier) && (derObjectValue instanceof DERSet)) {
              DERSet set = (DERSet) derObjectValue;
              ASN1UTCTime time = (ASN1UTCTime) set.getObjectAt(0);
              signature.setDate(time.getAdjustedDate());
            }
          }

          SignerId signerId = information.getSID();
          if (signerId != null) {
View Full Code Here

          if (signTimeDerSequence != null) {
            ASN1Primitive derObjectIdentifier = ((ASN1Primitive) signTimeDerSequence.getObjectAt(0)).toASN1Primitive();
            ASN1Primitive derObjectValue = ((ASN1Primitive) signTimeDerSequence.getObjectAt(1)).toASN1Primitive();
            if ((derObjectIdentifier instanceof ASN1ObjectIdentifier) && (derObjectValue instanceof DERSet)) {
              DERSet set = (DERSet) derObjectValue;
              ASN1UTCTime time = (ASN1UTCTime) set.getObjectAt(0);
              signature.setDate(time.getAdjustedDate());
            }
          }

          SignerId signerId = information.getSID();
          if (signerId != null) {
View Full Code Here

          if (signTimeDerSequence != null) {
            DERObject derObjectIdentifier = ((DERObject) signTimeDerSequence.getObjectAt(0)).toASN1Object();
            DERObject derObjectValue = ((DERObject) signTimeDerSequence.getObjectAt(1)).toASN1Object();
            if ((derObjectIdentifier instanceof ASN1ObjectIdentifier) && (derObjectValue instanceof DERSet)) {
              DERSet set = (DERSet) derObjectValue;
              ASN1UTCTime time = (ASN1UTCTime) set.getObjectAt(0);
              signature.setDate(time.getAdjustedDate());
            }
          }

          SignerId signerId = information.getSID();
          if (signerId != null) {
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1UTCTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.