PGPUserAttributeSubpacketVectorGenerator vGen = new PGPUserAttributeSubpacketVectorGenerator();
vGen.setImageAttribute(ImageAttribute.JPEG, jpegImage);
PGPUserAttributeSubpacketVector uVec = vGen.generate();
PGPSignatureGenerator sGen = new PGPSignatureGenerator(PublicKeyAlgorithmTags.RSA_GENERAL, HashAlgorithmTags.SHA1, "BC");
sGen.initSign(PGPSignature.POSITIVE_CERTIFICATION, pgpSec.getSecretKey().extractPrivateKey(pass, "BC"));
PGPSignature sig = sGen.generateCertification(uVec, pubKey);
PGPPublicKey nKey = PGPPublicKey.addCertification(pubKey, uVec, sig);
Iterator it = nKey.getUserAttributes();
int count = 0;
while (it.hasNext())
{
PGPUserAttributeSubpacketVector attributes = (PGPUserAttributeSubpacketVector)it.next();
Iterator sigs = nKey.getSignaturesForUserAttribute(attributes);
int sigCount = 0;
while (sigs.hasNext())
{