mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-13 04:09:38 +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(cert: OpenPGPCertificate, expirationDate: Date) : this(of(cert), expirationDate)
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
componentKey: OpenPGPComponentKey,
|
||||||
|
expirationDate: Date
|
||||||
|
) : this(of(componentKey), expirationDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
class RevokedKeyException : KeyException {
|
class RevokedKeyException : KeyException {
|
||||||
|
|
|
@ -35,7 +35,8 @@ class KeyRingInfo(
|
||||||
api: PGPainless = PGPainless.getInstance(),
|
api: PGPainless = PGPainless.getInstance(),
|
||||||
referenceDate: Date = Date()
|
referenceDate: Date = Date()
|
||||||
) : this(
|
) : this(
|
||||||
if (keys is PGPSecretKeyRing) OpenPGPKey(keys) else OpenPGPCertificate(keys),
|
if (keys is PGPSecretKeyRing) OpenPGPKey(keys, api.implementation)
|
||||||
|
else OpenPGPCertificate(keys, api.implementation),
|
||||||
api,
|
api,
|
||||||
referenceDate)
|
referenceDate)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue