mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 03:17:58 +01:00
Add KeyRingUtils.injectCertification(keys, certification)
This commit is contained in:
parent
5be42b22bd
commit
cd0b9603e7
1 changed files with 15 additions and 1 deletions
|
@ -238,7 +238,21 @@ public final class KeyRingUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Inject a key certification into the given key ring.
|
||||
* Inject a key certification for the primary key into the given key ring.
|
||||
*
|
||||
* @param keyRing key ring
|
||||
* @param certification key signature
|
||||
* @return key ring with injected signature
|
||||
* @param <T> either {@link PGPPublicKeyRing} or {@link PGPSecretKeyRing}
|
||||
*/
|
||||
@Nonnull
|
||||
public static <T extends PGPKeyRing> T injectCertification(@Nonnull T keyRing,
|
||||
@Nonnull PGPSignature certification) {
|
||||
return injectCertification(keyRing, keyRing.getPublicKey(), certification);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject a key certification for the given key into the given key ring.
|
||||
*
|
||||
* @param keyRing key ring
|
||||
* @param certifiedKey signed public key
|
||||
|
|
Loading…
Reference in a new issue