-
Notifications
You must be signed in to change notification settings - Fork 54
Fix warnings #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warnings #235
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| // TODO - Embedd this key's signatures? | ||
| userIDs.headOption foreach (spGen.setSignerUserID(false, _)) | ||
| userIDs.headOption foreach (spGen.addSignerUserID(false, _)) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| val packetVector = spGen.generate() | ||
| sGen.setHashedSubpackets(packetVector) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| case PublicKeyAlgorithmTags.ELGAMAL_ENCRYPT | PublicKeyAlgorithmTags.ELGAMAL_GENERAL => "ElGamal" | ||
| case PublicKeyAlgorithmTags.ECDSA => "ECDSA" | ||
| case _ => "Unknown" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/bcgit/bc-java/blob/1ff948a06c344932e93cc8e188dd06957e9e6887/pg/src/main/java/org/bouncycastle/openpgp/PGPSignatureSubpacketGenerator.java#L377-L381