mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-19 02:42:05 +01:00
Move org.bouncycastle classes to org.pgpainless.bouncycastle in order to avoid split package
See https://github.com/pgpainless/pgpainless/issues/428 for more background information
This commit is contained in:
parent
412f804eee
commit
252c520ca2
26 changed files with 42 additions and 41 deletions
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.bouncycastle
|
||||
package org.pgpainless.bouncycastle
|
||||
|
||||
import org.bouncycastle.openpgp.PGPPrivateKey
|
||||
import org.bouncycastle.openpgp.operator.bc.BcPublicKeyDataDecryptorFactory
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.bouncycastle.extensions
|
||||
package org.pgpainless.bouncycastle.extensions
|
||||
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.openpgp.PGPKeyRing
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.bouncycastle.extensions
|
||||
package org.pgpainless.bouncycastle.extensions
|
||||
|
||||
import org.bouncycastle.asn1.gnu.GNUObjectIdentifiers
|
||||
import org.bouncycastle.bcpg.ECDHPublicBCPGKey
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.bouncycastle.extensions
|
||||
package org.pgpainless.bouncycastle.extensions
|
||||
|
||||
import org.bouncycastle.bcpg.S2K
|
||||
import org.bouncycastle.openpgp.PGPException
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.bouncycastle.extensions
|
||||
package org.pgpainless.bouncycastle.extensions
|
||||
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.openpgp.*
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.bouncycastle.extensions
|
||||
package org.pgpainless.bouncycastle.extensions
|
||||
|
||||
import java.util.*
|
||||
import openpgp.plusSeconds
|
|
@ -7,9 +7,9 @@ package org.pgpainless.decryption_verification
|
|||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.util.*
|
||||
import org.bouncycastle.extensions.getPublicKeyFor
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory
|
||||
import org.pgpainless.bouncycastle.extensions.getPublicKeyFor
|
||||
import org.pgpainless.decryption_verification.cleartext_signatures.InMemoryMultiPassStrategy
|
||||
import org.pgpainless.decryption_verification.cleartext_signatures.MultiPassStrategy
|
||||
import org.pgpainless.key.SubkeyIdentifier
|
||||
|
|
|
@ -6,13 +6,13 @@ package org.pgpainless.decryption_verification
|
|||
|
||||
import java.util.*
|
||||
import javax.annotation.Nonnull
|
||||
import org.bouncycastle.extensions.matches
|
||||
import org.bouncycastle.openpgp.PGPKeyRing
|
||||
import org.bouncycastle.openpgp.PGPLiteralData
|
||||
import org.pgpainless.algorithm.CompressionAlgorithm
|
||||
import org.pgpainless.algorithm.StreamEncoding
|
||||
import org.pgpainless.algorithm.SymmetricKeyAlgorithm
|
||||
import org.pgpainless.authentication.CertificateAuthority
|
||||
import org.pgpainless.bouncycastle.extensions.matches
|
||||
import org.pgpainless.exception.MalformedOpenPgpMessageException
|
||||
import org.pgpainless.key.OpenPgpFingerprint
|
||||
import org.pgpainless.key.SubkeyIdentifier
|
||||
|
|
|
@ -10,16 +10,16 @@ import java.io.OutputStream
|
|||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.bcpg.BCPGInputStream
|
||||
import org.bouncycastle.bcpg.UnsupportedPacketVersionException
|
||||
import org.bouncycastle.extensions.getPublicKeyFor
|
||||
import org.bouncycastle.extensions.getSecretKeyFor
|
||||
import org.bouncycastle.extensions.issuerKeyId
|
||||
import org.bouncycastle.extensions.unlock
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory
|
||||
import org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory
|
||||
import org.bouncycastle.util.io.TeeInputStream
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.algorithm.*
|
||||
import org.pgpainless.bouncycastle.extensions.getPublicKeyFor
|
||||
import org.pgpainless.bouncycastle.extensions.getSecretKeyFor
|
||||
import org.pgpainless.bouncycastle.extensions.issuerKeyId
|
||||
import org.pgpainless.bouncycastle.extensions.unlock
|
||||
import org.pgpainless.decryption_verification.MessageMetadata.*
|
||||
import org.pgpainless.decryption_verification.cleartext_signatures.ClearsignedMessageUtil
|
||||
import org.pgpainless.decryption_verification.syntax_check.InputSymbol
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
package org.pgpainless.encryption_signing
|
||||
|
||||
import java.security.MessageDigest
|
||||
import org.bouncycastle.extensions.unlock
|
||||
import org.bouncycastle.openpgp.PGPException
|
||||
import org.bouncycastle.openpgp.PGPPrivateKey
|
||||
import org.bouncycastle.openpgp.PGPSecretKeyRing
|
||||
|
@ -13,6 +12,7 @@ import org.bouncycastle.openpgp.PGPSignature
|
|||
import org.bouncycastle.openpgp.PGPSignatureGenerator
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.bouncycastle.extensions.unlock
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector
|
||||
|
||||
class BcHashContextSigner {
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
package org.pgpainless.encryption_signing
|
||||
|
||||
import java.util.*
|
||||
import org.bouncycastle.extensions.matches
|
||||
import org.bouncycastle.openpgp.PGPLiteralData
|
||||
import org.bouncycastle.openpgp.PGPPublicKeyRing
|
||||
import org.bouncycastle.openpgp.PGPSignature
|
||||
import org.pgpainless.algorithm.CompressionAlgorithm
|
||||
import org.pgpainless.algorithm.StreamEncoding
|
||||
import org.pgpainless.algorithm.SymmetricKeyAlgorithm
|
||||
import org.pgpainless.bouncycastle.extensions.matches
|
||||
import org.pgpainless.key.SubkeyIdentifier
|
||||
import org.pgpainless.util.MultiMap
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
package org.pgpainless.encryption_signing
|
||||
|
||||
import java.util.*
|
||||
import org.bouncycastle.extensions.unlock
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.pgpainless.PGPainless.Companion.getPolicy
|
||||
import org.pgpainless.PGPainless.Companion.inspectKeyRing
|
||||
|
@ -13,6 +12,7 @@ import org.pgpainless.algorithm.DocumentSignatureType
|
|||
import org.pgpainless.algorithm.HashAlgorithm
|
||||
import org.pgpainless.algorithm.PublicKeyAlgorithm.Companion.requireFromId
|
||||
import org.pgpainless.algorithm.negotiation.HashAlgorithmNegotiator.Companion.negotiateSignatureHashAlgorithm
|
||||
import org.pgpainless.bouncycastle.extensions.unlock
|
||||
import org.pgpainless.exception.KeyException
|
||||
import org.pgpainless.exception.KeyException.*
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
|
|
|
@ -7,7 +7,6 @@ package org.pgpainless.key.generation
|
|||
import java.io.IOException
|
||||
import java.security.KeyPairGenerator
|
||||
import java.util.*
|
||||
import org.bouncycastle.extensions.unlock
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor
|
||||
import org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor
|
||||
|
@ -17,6 +16,7 @@ import org.bouncycastle.util.Strings
|
|||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.algorithm.KeyFlag
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.bouncycastle.extensions.unlock
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
import org.pgpainless.policy.Policy
|
||||
import org.pgpainless.provider.ProviderFactory
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
package org.pgpainless.key.info
|
||||
|
||||
import org.bouncycastle.extensions.getCurveName
|
||||
import org.bouncycastle.extensions.hasDummyS2K
|
||||
import org.bouncycastle.extensions.isDecrypted
|
||||
import org.bouncycastle.extensions.isEncrypted
|
||||
import org.bouncycastle.openpgp.PGPPublicKey
|
||||
import org.bouncycastle.openpgp.PGPSecretKey
|
||||
import org.pgpainless.bouncycastle.extensions.getCurveName
|
||||
import org.pgpainless.bouncycastle.extensions.hasDummyS2K
|
||||
import org.pgpainless.bouncycastle.extensions.isDecrypted
|
||||
import org.pgpainless.bouncycastle.extensions.isEncrypted
|
||||
|
||||
@Deprecated("Deprecated in favor of extension functions to PGPSecretKey and PGPPublicKey.")
|
||||
class KeyInfo private constructor(val secretKey: PGPSecretKey?, val publicKey: PGPPublicKey) {
|
||||
|
|
|
@ -6,10 +6,10 @@ package org.pgpainless.key.info
|
|||
|
||||
import java.util.*
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.extensions.*
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.algorithm.*
|
||||
import org.pgpainless.bouncycastle.extensions.*
|
||||
import org.pgpainless.exception.KeyException.UnboundUserIdException
|
||||
import org.pgpainless.key.OpenPgpFingerprint
|
||||
import org.pgpainless.key.SubkeyIdentifier
|
||||
|
|
|
@ -10,9 +10,6 @@ import javax.annotation.Nonnull
|
|||
import kotlin.NoSuchElementException
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.bcpg.sig.KeyExpirationTime
|
||||
import org.bouncycastle.extensions.getKeyExpirationDate
|
||||
import org.bouncycastle.extensions.publicKeyAlgorithm
|
||||
import org.bouncycastle.extensions.requirePublicKey
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.PGPainless.Companion.inspectKeyRing
|
||||
|
@ -21,6 +18,9 @@ import org.pgpainless.algorithm.Feature
|
|||
import org.pgpainless.algorithm.KeyFlag
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.algorithm.negotiation.HashAlgorithmNegotiator
|
||||
import org.pgpainless.bouncycastle.extensions.getKeyExpirationDate
|
||||
import org.pgpainless.bouncycastle.extensions.publicKeyAlgorithm
|
||||
import org.pgpainless.bouncycastle.extensions.requirePublicKey
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
import org.pgpainless.key.OpenPgpFingerprint
|
||||
import org.pgpainless.key.generation.KeyRingBuilder
|
||||
|
|
|
@ -7,12 +7,12 @@ package org.pgpainless.key.protection
|
|||
|
||||
import kotlin.jvm.Throws
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.extensions.isEncrypted
|
||||
import org.bouncycastle.openpgp.PGPException
|
||||
import org.bouncycastle.openpgp.PGPPrivateKey
|
||||
import org.bouncycastle.openpgp.PGPSecretKey
|
||||
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.bouncycastle.extensions.isEncrypted
|
||||
import org.pgpainless.exception.KeyIntegrityException
|
||||
import org.pgpainless.exception.WrongPassphraseException
|
||||
import org.pgpainless.key.util.PublicKeyParameterValidationUtil
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
package org.pgpainless.key.protection.fixes
|
||||
|
||||
import org.bouncycastle.bcpg.SecretKeyPacket
|
||||
import org.bouncycastle.extensions.unlock
|
||||
import org.bouncycastle.openpgp.PGPSecretKey
|
||||
import org.bouncycastle.openpgp.PGPSecretKeyRing
|
||||
import org.pgpainless.algorithm.HashAlgorithm
|
||||
import org.pgpainless.bouncycastle.extensions.unlock
|
||||
import org.pgpainless.exception.WrongPassphraseException
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector
|
||||
|
|
|
@ -9,10 +9,10 @@ import kotlin.jvm.Throws
|
|||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.bcpg.S2K
|
||||
import org.bouncycastle.bcpg.SecretKeyPacket
|
||||
import org.bouncycastle.extensions.certificate
|
||||
import org.bouncycastle.extensions.requireSecretKey
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.bouncycastle.util.Strings
|
||||
import org.pgpainless.bouncycastle.extensions.certificate
|
||||
import org.pgpainless.bouncycastle.extensions.requireSecretKey
|
||||
import org.pgpainless.exception.MissingPassphraseException
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.io.IOException
|
|||
import java.math.BigInteger
|
||||
import java.security.SecureRandom
|
||||
import org.bouncycastle.bcpg.*
|
||||
import org.bouncycastle.extensions.publicKeyAlgorithm
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.bouncycastle.util.Arrays
|
||||
import org.bouncycastle.util.io.Streams
|
||||
|
@ -17,6 +16,7 @@ import org.pgpainless.algorithm.HashAlgorithm
|
|||
import org.pgpainless.algorithm.PublicKeyAlgorithm.Companion.requireFromId
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.algorithm.SymmetricKeyAlgorithm
|
||||
import org.pgpainless.bouncycastle.extensions.publicKeyAlgorithm
|
||||
import org.pgpainless.exception.KeyIntegrityException
|
||||
import org.pgpainless.implementation.ImplementationFactory.Companion.getInstance
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ import java.io.InputStream
|
|||
import java.util.*
|
||||
import openpgp.plusSeconds
|
||||
import org.bouncycastle.bcpg.sig.KeyExpirationTime
|
||||
import org.bouncycastle.extensions.*
|
||||
import org.bouncycastle.openpgp.*
|
||||
import org.bouncycastle.util.encoders.Hex
|
||||
import org.bouncycastle.util.io.Streams
|
||||
import org.pgpainless.bouncycastle.extensions.*
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
import org.pgpainless.key.OpenPgpFingerprint
|
||||
import org.pgpainless.key.util.RevocationAttributes.Reason
|
||||
|
|
|
@ -7,13 +7,13 @@ package org.pgpainless.signature.consumer
|
|||
import java.io.InputStream
|
||||
import java.util.*
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.extensions.issuerKeyId
|
||||
import org.bouncycastle.openpgp.PGPPublicKey
|
||||
import org.bouncycastle.openpgp.PGPPublicKeyRing
|
||||
import org.bouncycastle.openpgp.PGPSignature
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.algorithm.KeyFlag
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.bouncycastle.extensions.issuerKeyId
|
||||
import org.pgpainless.exception.SignatureValidationException
|
||||
import org.pgpainless.key.util.KeyRingUtils
|
||||
import org.pgpainless.policy.Policy
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
package org.pgpainless.signature.consumer
|
||||
|
||||
import java.util.Date
|
||||
import org.bouncycastle.extensions.getPublicKeyFor
|
||||
import org.bouncycastle.extensions.isExpired
|
||||
import org.bouncycastle.extensions.wasIssuedBy
|
||||
import org.bouncycastle.openpgp.PGPKeyRing
|
||||
import org.bouncycastle.openpgp.PGPPublicKey
|
||||
import org.bouncycastle.openpgp.PGPSignature
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.bouncycastle.extensions.getPublicKeyFor
|
||||
import org.pgpainless.bouncycastle.extensions.isExpired
|
||||
import org.pgpainless.bouncycastle.extensions.wasIssuedBy
|
||||
import org.pgpainless.exception.SignatureValidationException
|
||||
import org.pgpainless.policy.Policy
|
||||
|
||||
|
|
|
@ -8,12 +8,6 @@ import java.lang.Exception
|
|||
import java.util.Date
|
||||
import openpgp.formatUTC
|
||||
import openpgp.openPgpKeyId
|
||||
import org.bouncycastle.extensions.fingerprint
|
||||
import org.bouncycastle.extensions.isHardRevocation
|
||||
import org.bouncycastle.extensions.isOfType
|
||||
import org.bouncycastle.extensions.publicKeyAlgorithm
|
||||
import org.bouncycastle.extensions.signatureExpirationDate
|
||||
import org.bouncycastle.extensions.signatureHashAlgorithm
|
||||
import org.bouncycastle.openpgp.PGPException
|
||||
import org.bouncycastle.openpgp.PGPPublicKey
|
||||
import org.bouncycastle.openpgp.PGPSignature
|
||||
|
@ -21,6 +15,12 @@ import org.bouncycastle.openpgp.PGPUserAttributeSubpacketVector
|
|||
import org.pgpainless.algorithm.KeyFlag
|
||||
import org.pgpainless.algorithm.SignatureSubpacket
|
||||
import org.pgpainless.algorithm.SignatureType
|
||||
import org.pgpainless.bouncycastle.extensions.fingerprint
|
||||
import org.pgpainless.bouncycastle.extensions.isHardRevocation
|
||||
import org.pgpainless.bouncycastle.extensions.isOfType
|
||||
import org.pgpainless.bouncycastle.extensions.publicKeyAlgorithm
|
||||
import org.pgpainless.bouncycastle.extensions.signatureExpirationDate
|
||||
import org.pgpainless.bouncycastle.extensions.signatureHashAlgorithm
|
||||
import org.pgpainless.exception.SignatureValidationException
|
||||
import org.pgpainless.implementation.ImplementationFactory
|
||||
import org.pgpainless.key.OpenPgpFingerprint
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
package org.pgpainless.signature.consumer
|
||||
|
||||
import org.bouncycastle.extensions.isHardRevocation
|
||||
import org.bouncycastle.openpgp.PGPSignature
|
||||
import org.pgpainless.bouncycastle.extensions.isHardRevocation
|
||||
|
||||
/**
|
||||
* Comparator which sorts signatures based on an ordering and on revocation hardness.
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.bouncycastle.util.io.Streams;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.pgpainless.PGPainless;
|
||||
import org.pgpainless.algorithm.EncryptionPurpose;
|
||||
import org.pgpainless.bouncycastle.CachingBcPublicKeyDataDecryptorFactory;
|
||||
import org.pgpainless.decryption_verification.ConsumerOptions;
|
||||
import org.pgpainless.decryption_verification.DecryptionStream;
|
||||
import org.pgpainless.key.SubkeyIdentifier;
|
||||
|
|
Loading…
Reference in a new issue