Examples of verifyCertification()


Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

        sig = (PGPSignature)it.next();

        sig.init(new BcPGPContentVerifierBuilderProvider(), key);

        if (!sig.verifyCertification(uid, key))
        {
            fail("failed to verify certification");
        }

        pgpPrivKey = secretKey.extractPrivateKey(new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(newPass.toCharArray()));
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

                fail("wrong number of revocations in test7.");
            }

            sig.initVerify(masterKey, "BC");
                                                                           
            if (!sig.verifyCertification(k))
            {
                fail("failed to verify revocation certification");
            }
        }
    }
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

            if (sig.getKeyID() == vKey.getKeyID()
                && sig.getSignatureType() == PGPSignature.SUBKEY_BINDING)
            {
                sig.initVerify(vKey, "BC");

                if (!sig.verifyCertification(vKey, sKey))
                {
                    fail("failed to verify sub-key signature.");
                }
            }
        }
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

            if (sig.getKeyID() == vKey.getKeyID()
                && sig.getSignatureType() == PGPSignature.SUBKEY_BINDING)
            {
                sig.initVerify(vKey, "BC");
   
                if (!sig.verifyCertification(vKey, sKey))
                {
                    fail("failed to verify sub-key signature.");
                }
            }
        }
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

            if (sig.getSignatureType() == PGPSignature.POSITIVE_CERTIFICATION)
            {
                sig.initVerify(pub, "BC");

                if (!sig.verifyCertification(userID, pub))
                {
                    fail("failed UTF8 userID test");
                }
            }
        }
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

            if (sig.getSignatureType() == PGPSignature.POSITIVE_CERTIFICATION)
            {
                sig.initVerify(pub, "BC");

                if (!sig.verifyCertification(userID, pub))
                {
                    fail("failed UTF8 userID creation test");
                }
            }
        }
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

        PGPSignature sig = sGen.generateCertification(secretKey.getPublicKey());
       
        sig.initVerify(secretKey.getPublicKey(), "BC");
       
        if (!sig.verifyCertification(secretKey.getPublicKey()))
        {
            fail("revocation verification failed.");
        }
       
        PGPSecretKeyRing pgpDSAPriv = new PGPSecretKeyRing(dsaKeyRing);        
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

       
        sig = ((PGPSignatureList) f.nextObject()).get(0);
       
        sig.initVerify(secretDSAKey.getPublicKey(), "BC");
       
        if (!sig.verifyCertification(secretDSAKey.getPublicKey(), secretKey.getPublicKey()))
        {
            fail("subkey binding verification failed.");
        }
       
        PGPSignatureSubpacketVector hashedPcks = sig.getHashedSubPackets();
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

        sig = sGen.generateCertification(TEST_USER_ID, secretKey.getPublicKey());
       
        sig.initVerify(secretDSAKey.getPublicKey(), "BC");
       
        if (!sig.verifyCertification(TEST_USER_ID, secretKey.getPublicKey()))
        {
            fail("subkey binding verification failed.");
        }
       
        hashedPcks = sig.getHashedSubPackets();
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verifyCertification()

            fail("found wrong number of unhashed packets");
        }
       
        try
        {
            sig.verifyCertification(secretKey.getPublicKey());
           
            fail("failed to detect non-key signature.");
        }
        catch (PGPException e)
        {
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.