Examples of toASN1Object()


Examples of org.bouncycastle.asn1.DERTaggedObject.toASN1Object()

       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ASN1OutputStream asn1Out = new ASN1OutputStream(out);

        ASN1Object spnegoOIDASN1 =  (ASN1Object) spnegoOid.toASN1Object();
        ASN1Object taggedSpnegoASN1    =    (ASN1Object) taggedSpnego.toASN1Object();
       
        int length = spnegoOIDASN1.getDEREncoded().length + taggedSpnegoASN1.getDEREncoded().length;
        byte [] lenBytes = writeLength(length);
        byte[] appWrap = new byte[lenBytes.length + 1];
       
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject.toASN1Object()

            appWrap[i] = lenBytes[i-1];
        }
       
        asn1Out.write(appWrap);
        asn1Out.writeObject(spnegoOid.toASN1Object());
        asn1Out.writeObject(taggedSpnego.toASN1Object());

        byte[] app = out.toByteArray();
        ASN1InputStream in = new ASN1InputStream(app);

        if( LOG.isDebugEnabled() ){
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject.toASN1Object()

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ASN1OutputStream asn1Out = new ASN1OutputStream(out);

        ASN1Object spnegoOIDASN1 =  (ASN1Object) spnegoOid.toASN1Object();
        ASN1Object taggedSpnegoASN1    =    (ASN1Object) taggedSpnego.toASN1Object();

        int length = spnegoOIDASN1.getDEREncoded().length + taggedSpnegoASN1.getDEREncoded().length;
        byte [] lenBytes = writeLength(length);
        byte[] appWrap = new byte[lenBytes.length + 1];
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject.toASN1Object()

            appWrap[i] = lenBytes[i-1];
        }

        asn1Out.write(appWrap);
        asn1Out.writeObject(spnegoOid.toASN1Object());
        asn1Out.writeObject(taggedSpnego.toASN1Object());

        byte[] app = out.toByteArray();
        ASN1InputStream in = new ASN1InputStream(app);

        if (log.isDebugEnabled() ){
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo.toASN1Object()

           
            EncryptedPrivateKeyInfo encInfo = EncryptedPrivateKeyInfo.getInstance((ASN1Sequence)b.getBagValue());
           
            encInfo = new EncryptedPrivateKeyInfo(encInfo.getEncryptionAlgorithm(), encInfo.getEncryptedData());
           
            b = new SafeBag(PKCSObjectIdentifiers.pkcs8ShroudedKeyBag, encInfo.toASN1Object(), b.getBagAttributes());
           
            ByteArrayOutputStream abOut = new ByteArrayOutputStream();
            ASN1OutputStream      berOut = new ASN1OutputStream(abOut);
           
            berOut.writeObject(new DERSequence(b));
View Full Code Here

Examples of org.bouncycastle.cert.ocsp.RespID.toASN1Object()

                    ocspIdentifier.setProducedAt(cal);
   
                    ResponderIDType responderId = ocspIdentifier.addNewResponderID();
   
                    RespID respId = basicOcspResp.getResponderId();
                    ResponderID ocspResponderId = respId.toASN1Object();
                    DERTaggedObject derTaggedObject = (DERTaggedObject)ocspResponderId.toASN1Primitive();
                    if (2 == derTaggedObject.getTagNo()) {
                        ASN1OctetString keyHashOctetString = (ASN1OctetString)derTaggedObject.getObject();
                        byte key[] = keyHashOctetString.getOctets();
                        responderId.setByKey(key);
View Full Code Here

Examples of org.bouncycastle.ocsp.RespID.toASN1Object()

              return ret;
            }
      }

    final RespID id = brep.getResponderId();
    final DERTaggedObject to = (DERTaggedObject)id.toASN1Object().toASN1Object();
    final RespID respId;
        final X509Certificate[] chain = brep.getCerts("BC");
        final PublicKey signerPub = chain[0].getPublicKey();
    if (to.getTagNo() == 1) {
      // This is Name
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.