1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-08 21:31:08 +01:00

Fix some tests

This commit is contained in:
Paul Schaub 2025-02-19 15:34:42 +01:00
parent 3feaf9134b
commit a6e7bb18e9
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
6 changed files with 16 additions and 11 deletions

View file

@ -329,8 +329,8 @@ class ConsumerOptions {
fun isIgnoreMDCErrors(): Boolean = ignoreMDCErrors
fun setAllowDecryptionWithNonEncryptionKey(allow: Boolean): ConsumerOptions = apply {
allowDecryptionWithNonEncryptionKey = allow
fun setAllowDecryptionWithMissingKeyFlags(): ConsumerOptions = apply {
allowDecryptionWithNonEncryptionKey = true
}
fun getAllowDecryptionWithNonEncryptionKey(): Boolean {

View file

@ -310,7 +310,7 @@ class SecretKeyRingEditor(var key: OpenPGPKey, override val referenceTime: Date
if (subkeyAlgorithm.isSigningCapable()) {
val pkBindingBuilder =
PrimaryKeyBindingSignatureBuilder(
key.primarySecretKey, subkeyProtector, hashAlgorithm)
key.primarySecretKey, primaryKeyProtector, hashAlgorithm)
pkBindingBuilder.hashedSubpackets.setSignatureCreationTime(referenceTime)
hashedSubpackets.addEmbeddedSignature(pkBindingBuilder.build(primaryKey.publicKey))
}