1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-09 18:29:39 +02:00

generate-key: Use API instance when generating keys

This commit is contained in:
Paul Schaub 2025-04-01 14:33:08 +02:00
parent 53b44e2817
commit 5f3e1b4da3
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -92,7 +92,7 @@ class GenerateKeyImpl(private val api: PGPainless) : GenerateKey {
val keyBuilder: KeyRingBuilder =
when (profile) {
CURVE25519_PROFILE.name ->
PGPainless.buildKeyRing()
api.buildKey()
.setPrimaryKey(
KeySpec.getBuilder(
KeyType.EDDSA_LEGACY(EdDSALegacyCurve._Ed25519),
@ -110,7 +110,7 @@ class GenerateKeyImpl(private val api: PGPainless) : GenerateKey {
}
}
RSA4096_PROFILE.name -> {
PGPainless.buildKeyRing()
api.buildKey()
.setPrimaryKey(
KeySpec.getBuilder(KeyType.RSA(RsaLength._4096), KeyFlag.CERTIFY_OTHER))
.addSubkey(