Package org.apache.geronimo.util.asn1

Examples of org.apache.geronimo.util.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

        catch (Exception e)
        {
            throw new SecurityException("exception encoding TBS cert - " + e);
        }

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(tbsCert);
        v.add(sigAlgId);
        v.add(new DERBitString(sig.sign()));

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

    * <code>String</code> oids
    * to other <code>String</code> oids.
    */
   public PolicyMappings (Hashtable mappings)
      {
         ASN1EncodableVector dev = new ASN1EncodableVector();
         Enumeration it = mappings.keys();

         while (it.hasMoreElements()) {
            String idp = (String) it.nextElement();
            String sdp = (String) mappings.get(idp);
            ASN1EncodableVector dv = new ASN1EncodableVector();
            dv.add(new DERObjectIdentifier(idp));
            dv.add(new DERObjectIdentifier(sdp));
            dev.add(new DERSequence(dv));
         }

         seq = new DERSequence(dev);
      }
View Full Code Here

    *
    * @return a <code>DERObject</code> value
    */
   public DERObject toASN1Object()
   {
      ASN1EncodableVector dev = new ASN1EncodableVector();
      dev.add(policyQualifierId);
      dev.add(qualifier);

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

TOP

Related Classes of org.apache.geronimo.util.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.