mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 18:59:39 +02:00
KeyRingInfo: Pass API instance to key constructors
This commit is contained in:
parent
75093de961
commit
2ed16e8f52
2 changed files with 7 additions and 1 deletions
|
@ -38,6 +38,11 @@ abstract class KeyException : RuntimeException {
|
|||
) {
|
||||
|
||||
constructor(cert: OpenPGPCertificate, expirationDate: Date) : this(of(cert), expirationDate)
|
||||
|
||||
constructor(
|
||||
componentKey: OpenPGPComponentKey,
|
||||
expirationDate: Date
|
||||
) : this(of(componentKey), expirationDate)
|
||||
}
|
||||
|
||||
class RevokedKeyException : KeyException {
|
||||
|
|
|
@ -35,7 +35,8 @@ class KeyRingInfo(
|
|||
api: PGPainless = PGPainless.getInstance(),
|
||||
referenceDate: Date = Date()
|
||||
) : this(
|
||||
if (keys is PGPSecretKeyRing) OpenPGPKey(keys) else OpenPGPCertificate(keys),
|
||||
if (keys is PGPSecretKeyRing) OpenPGPKey(keys, api.implementation)
|
||||
else OpenPGPCertificate(keys, api.implementation),
|
||||
api,
|
||||
referenceDate)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue