Package com.maverick.crypto.asn1

Examples of com.maverick.crypto.asn1.ASN1Null


  if (oid == null) {
      throw new NullPointerException("Need an OID!");
  }
  if (value == null) {
      value = new ASN1Null();
  }
  type_ = oid;
  values_ = new ASN1Set(1);

  values_.add(value);
View Full Code Here


   * resolves the ANY DEFINED BY type. If the statement info is never
   * actually required then an ASN1Opaque may be used to save the overhead
   * of actually decoding the info. --volker roth
   */
  oid_ = new ASN1ObjectIdentifier();
  info_ = new ASN1Null();
  info_.setOptional(true);
  add(oid_);
  add(info_);
    }
View Full Code Here

        oid_ = new ASN1ObjectIdentifier(oid);

        if (oid.equals("2.1.0.2.0"))
        {
            parameter_ = new ASN1Null();
        }
        else if (oid.equals("2.1.0.2.2"))
        {
            parameter_ = new ASN1Integer((BigInteger)obj);
        }
View Full Code Here

        oid_ = new ASN1ObjectIdentifier(oid);

        if (oid.equals("2.1.0.2.0"))
        {
            parameter_ = new ASN1Null();
        }
        else if (oid.equals("2.1.0.2.2"))
        {
            parameter_ = new ASN1Integer((BigInteger)obj);
        }
View Full Code Here

     */
    public ASN1Type resolve(ASN1Type caller) throws ResolverException
    {
        if (oid_.toString().equals("2.1.0.2.0"))
        {
            return new ASN1Null();
        }
        else if (oid_.toString().equals("2.1.0.2.2"))
        {
            return new ASN1Integer();
        }
View Full Code Here

      throw new NoSuchAlgorithmException(
        "Cannot resolve signature algorithm!");
  }
  try {
      dAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(d),
        new ASN1Null());
      cAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(c),
        new ASN1Null());
  } catch (ASN1Exception e) {
      throw new InconsistentStateException(e);
  }
  /* Digest Algorithm Identifier */
  add(dAlg_);
 
View Full Code Here

      throw new NoSuchAlgorithmException(
        "Cannot resolve signature algorithm!");
  }
  try {
      dAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(d),
        new ASN1Null());
      cAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(c),
        new ASN1Null());
  } catch (ASN1Exception e) {
      throw new InconsistentStateException(e);
  }
  /* Digest Algorithm Identifier */
  add(dAlg_);
 
View Full Code Here

        return (X509Extension)extensions.get(oid);
    }

    public DERObject getDERObject()
    {
        ASN1EncodableVector     vec = new ASN1EncodableVector();
        Enumeration             e = ordering.elements();

        while (e.hasMoreElements())
        {
            DERObjectIdentifier     oid = (DERObjectIdentifier)e.nextElement();
            X509Extension           ext = (X509Extension)extensions.get(oid);
            ASN1EncodableVector     v = new ASN1EncodableVector();

            v.add(oid);

            if (ext.isCritical())
            {
                v.add(new DERBoolean(true));
            }

            v.add(ext.getValue());

            vec.add(new DERSequence(v));
        }

        return new DERSequence(vec);
View Full Code Here

     *                          publicKey BIT STRING }
     * </pre>
     */
    public DERObject getDERObject()
    {
        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(algId);
        v.add(keyData);

        return new DERSequence(v);
    }
View Full Code Here

     * </pre>
     * <p>
     */
    public DERObject getDERObject()
    {
        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(new DERInteger(getModulus()));
        v.add(new DERInteger(getPublicExponent()));

        return new DERSequence(v);
    }
View Full Code Here

TOP

Related Classes of com.maverick.crypto.asn1.ASN1Null

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.