Examples of ASN1ObjectIdentifier


Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

        }
        else
        {
            if (ecSpec instanceof ECNamedCurveSpec)
            {
                ASN1ObjectIdentifier curveOid = ECUtil.getNamedCurveOid(((ECNamedCurveSpec)ecSpec).getName());
                if (curveOid == null)
                {
                    curveOid = new ASN1ObjectIdentifier(((ECNamedCurveSpec)ecSpec).getName());
                }
                params = new X962Parameters(curveOid);
            }
            else if (ecSpec == null)
            {
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

    }

    public PrivateKey generatePrivate(PrivateKeyInfo info)
        throws IOException
    {
        ASN1ObjectIdentifier algOid = info.getPrivateKeyAlgorithm().getAlgorithm();

        if (algOid.equals(PKCSObjectIdentifiers.dhKeyAgreement))
        {
            return new BCElGamalPrivateKey(info);
        }
        else if (algOid.equals(X9ObjectIdentifiers.dhpublicnumber))
        {
            return new BCElGamalPrivateKey(info);
        }
        else if (algOid.equals(OIWObjectIdentifiers.elGamalAlgorithm))
        {
            return new BCElGamalPrivateKey(info);
        }
        else
        {
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

    }

    public PublicKey generatePublic(SubjectPublicKeyInfo info)
        throws IOException
    {
        ASN1ObjectIdentifier algOid = info.getAlgorithm().getAlgorithm();

        if (algOid.equals(PKCSObjectIdentifiers.dhKeyAgreement))
        {
            return new BCElGamalPublicKey(info);
        }
        else if (algOid.equals(X9ObjectIdentifiers.dhpublicnumber))
        {
            return new BCElGamalPublicKey(info);
        }
        else if (algOid.equals(OIWObjectIdentifiers.elGamalAlgorithm))
        {
            return new BCElGamalPublicKey(info);
        }
        else
        {
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

    /**
     * @deprecated use ASN1ObjectIdentifier
     */
    public Attribute get(DERObjectIdentifier oid)
    {
        return get(new ASN1ObjectIdentifier(oid.getId()));
    }
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

     /**
     * @deprecated use ASN1ObjectIdentifier
     */
    public ASN1EncodableVector getAll(DERObjectIdentifier oid)
    {
        return getAll(new ASN1ObjectIdentifier(oid.getId()));
    }
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

      Extensions issuerExtensions = parsedIssuerCert.getTBSCertificate().getExtensions();
      Extension x509authorityKeyIdentifier = null;
      if (issuerExtensions != null) {
        x509authorityKeyIdentifier =
            issuerExtensions.getExtension(new ASN1ObjectIdentifier(X509_AUTHORITY_KEY_IDENTIFIER));
      }

      return new IssuerInformation(
          parsedIssuerCert.getIssuer(), keyHash, x509authorityKeyIdentifier, true);
    } catch (CertificateEncodingException e) {
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

  }

  private static boolean hasX509AuthorityKeyIdentifier(
      org.bouncycastle.asn1.x509.Certificate cert) {
    Extensions extensions = cert.getTBSCertificate().getExtensions();
    return extensions.getExtension(new ASN1ObjectIdentifier(X509_AUTHORITY_KEY_IDENTIFIER)) != null;
  }
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

        ECDomainParameters  ecP = ECGOST3410NamedCurves.getByName(name);
        if (ecP == null)
        {
            try
            {
                ecP = ECGOST3410NamedCurves.getByOID(new ASN1ObjectIdentifier(name));
            }
            catch (IllegalArgumentException e)
            {
                return null; // not an oid.
            }
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

        {
            Enumeration     e = extensions.oids();
   
            while (e.hasMoreElements())
            {
                ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)e.nextElement();
                X509Extension       ext = extensions.getExtension(oid);
   
                if (critical == ext.isCritical())
                {
                    set.add(oid.getId());
                }
            }
        }

        return set;
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1ObjectIdentifier

    {
        X509Extensions exts = this.getRequestExtensions();

        if (exts != null)
        {
            X509Extension   ext = exts.getExtension(new ASN1ObjectIdentifier(oid));

            if (ext != null)
            {
                try
                {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.