diff --git a/gpg-library/src/main/scala/com/jsuereth/pgp/PrivateKey.scala b/gpg-library/src/main/scala/com/jsuereth/pgp/PrivateKey.scala index 38c2686..6448206 100644 --- a/gpg-library/src/main/scala/com/jsuereth/pgp/PrivateKey.scala +++ b/gpg-library/src/main/scala/com/jsuereth/pgp/PrivateKey.scala @@ -95,7 +95,7 @@ class SecretKey(val nested: PGPSecretKey) { sGen.init(PGPSignature.BINARY_DOCUMENT, pgpPrivKey) for (name <- this.publicKey.userIDs) { val spGen = new PGPSignatureSubpacketGenerator() - spGen.setSignerUserID(false, name) + spGen.addSignerUserID(false, name) sGen.setHashedSubpackets(spGen.generate()) } val cGen = new PGPCompressedDataGenerator(CompressionAlgorithmTags.ZLIB) @@ -149,9 +149,9 @@ class SecretKey(val nested: PGPSecretKey) { sGen.generateOnePassVersion(false).encode(bOut) val spGen = new PGPSignatureSubpacketGenerator() val isHumanReadable = true - spGen.setNotationData(true, isHumanReadable, notation._1, notation._2) + spGen.addNotationData(true, isHumanReadable, notation._1, notation._2) // TODO - Embedd this key's signatures? - userIDs.headOption foreach (spGen.setSignerUserID(false, _)) + userIDs.headOption foreach (spGen.addSignerUserID(false, _)) val packetVector = spGen.generate() sGen.setHashedSubpackets(packetVector) diff --git a/gpg-library/src/main/scala/com/jsuereth/pgp/PublicKey.scala b/gpg-library/src/main/scala/com/jsuereth/pgp/PublicKey.scala index c8490b4..3d40f6b 100644 --- a/gpg-library/src/main/scala/com/jsuereth/pgp/PublicKey.scala +++ b/gpg-library/src/main/scala/com/jsuereth/pgp/PublicKey.scala @@ -18,13 +18,13 @@ class PublicKey(val nested: PGPPublicKey) extends PublicKeyLike with StreamingSa def bitStrength = nested.getBitStrength def creationTime = nested.getCreationTime def fingerprint = nested.getFingerprint - def isRevoked = nested.isRevoked + def isRevoked = nested.hasRevocation def algorithm = nested.getAlgorithm def algorithmName = nested.getAlgorithm match { case PublicKeyAlgorithmTags.RSA_ENCRYPT | PublicKeyAlgorithmTags.RSA_GENERAL | PublicKeyAlgorithmTags.RSA_SIGN => "RSA" case PublicKeyAlgorithmTags.DSA => "DSA" - case PublicKeyAlgorithmTags.EC => "EC" + case PublicKeyAlgorithmTags.ECDH => "EC" case PublicKeyAlgorithmTags.ELGAMAL_ENCRYPT | PublicKeyAlgorithmTags.ELGAMAL_GENERAL => "ElGamal" case PublicKeyAlgorithmTags.ECDSA => "ECDSA" case _ => "Unknown"