Examples of DERSequence


Examples of com.maverick.crypto.asn1.DERSequence

                v.add(new DERBoolean(true));
            }

            v.add(ext.getValue());

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

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

Examples of com.maverick.crypto.asn1.DERSequence

        ASN1EncodableVector  v = new ASN1EncodableVector();

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

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

Examples of com.maverick.crypto.asn1.DERSequence

        ASN1EncodableVector  v = new ASN1EncodableVector();

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

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

Examples of com.maverick.crypto.asn1.DERSequence

          {
              v.add(pathLenConstraint);
          }
    }

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

Examples of com.maverick.crypto.asn1.DERSequence

        if (parametersDefined)
        {
            v.add(parameters);
        }

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

Examples of jcifs.spnego.asn1.DERSequence

            if (mechanismListMIC != null) {
                fields.add(new DERTaggedObject(true, 3,
                        new DEROctetString(mechanismListMIC)));
            }
            der.writeObject(new DERTaggedObject(true, 1,
                    new DERSequence(fields)));
            return collector.toByteArray();
        } catch (IOException ex) {
            throw new IllegalStateException(ex.getMessage());
        }
    }
View Full Code Here

Examples of jcifs.spnego.asn1.DERSequence

                ASN1EncodableVector vector = new ASN1EncodableVector();
                for (int i = 0; i < mechanisms.length; i++) {
                    vector.add(new DERObjectIdentifier(mechanisms[i]));
                }
                fields.add(new DERTaggedObject(true, 0,
                        new DERSequence(vector)));
            }
            int contextFlags = getContextFlags();
            if (contextFlags != 0) {
                fields.add(new DERTaggedObject(true, 1,
                        new DERBitString(contextFlags)));
            }
            byte[] mechanismToken = getMechanismToken();
            if (mechanismToken != null) {
                fields.add(new DERTaggedObject(true, 2,
                        new DEROctetString(mechanismToken)));
            }
            byte[] mechanismListMIC = getMechanismListMIC();
            if (mechanismListMIC != null) {
                fields.add(new DERTaggedObject(true, 3,
                        new DEROctetString(mechanismListMIC)));
            }
            der.writeObject(new DERTaggedObject(true, 0,
                        new DERSequence(fields)));
            DERObject token = new DERUnknownTag(DERTags.CONSTRUCTED |
                    DERTags.APPLICATION, collector.toByteArray());
            der = new DEROutputStream(collector = new ByteArrayOutputStream());
            der.writeObject(token);
            return collector.toByteArray();
View Full Code Here

Examples of org.apache.commons.ssl.asn1.DERSequence

        new BigInteger(Integer.toString(Integer.MAX_VALUE));

    public static ASN1Structure analyze(byte[] asn1)
        throws IOException {
        ASN1InputStream asn = new ASN1InputStream(asn1);
        DERSequence seq = (DERSequence) asn.readObject();
        ASN1Structure pkcs8 = new ASN1Structure();
        ASN1Util.analyze(seq, pkcs8, 0);
        return pkcs8;
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.DERSequence

    {
        ASN1InputStream ais = new ASN1InputStream( in );

        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();

        DERSequence kdcreq = ( DERSequence ) app.getObject();

        return decodeKdcRequestSequence( kdcreq );
    }
View Full Code Here

Examples of org.apache.geronimo.crypto.asn1.DERSequence

     */
    public static Map processSPKAC(String spkac) throws IOException, NoSuchAlgorithmException, InvalidKeyException, SignatureException, Exception {
        Map map = new HashMap();
        byte[]data = Base64.decode(spkac);
        ASN1InputStream ais = new ASN1InputStream(new ByteArrayInputStream(data));
        DERSequence spkacSeq = (DERSequence)ais.readObject();

        // SPKAC = SEQ {PKAC, SIGN-ALG, SIGN}
        // Get PKAC and obtain PK and C
        DERSequence pkacSeq = (DERSequence)spkacSeq.getObjectAt(0);
        DERObject pk = (DERObject)pkacSeq.getObjectAt(0);
        DERObject ch = (DERObject)pkacSeq.getObjectAt(1);
        SubjectPublicKeyInfo pkInfo = new SubjectPublicKeyInfo((DERSequence)pk);
        PublicKey pubKey =  getPublicKeyObject(pkInfo);

        // Get SIGN-ALG
        DERSequence signAlg = (DERSequence) spkacSeq.getObjectAt(1);
        DERObject alg0 = (DERObject)signAlg.getObjectAt(0);

        // Get SIGN
        DERBitString sign = (DERBitString) spkacSeq.getObjectAt(2);
        byte[] signature = sign.getBytes();
       
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.