提交 b9110629 编写于 作者: S Stephen Connolly

[JENKINS-36871] Make the provider methods protected now that we go through the KeyTypes singletons

上级 9743db3c
......@@ -71,7 +71,7 @@ public abstract class InstanceIdentityProvider<PUB extends PublicKey, PRIV exten
* is not permitted at the required length by the JCA policy.
*/
@CheckForNull
public abstract KeyPair getKeyPair();
protected abstract KeyPair getKeyPair();
/**
* Shortcut to {@link KeyPair#getPublic()}.
......@@ -80,7 +80,7 @@ public abstract class InstanceIdentityProvider<PUB extends PublicKey, PRIV exten
*/
@SuppressWarnings("unchecked")
@CheckForNull
public PUB getPublicKey() {
protected PUB getPublicKey() {
KeyPair keyPair = getKeyPair();
return keyPair == null ? null : (PUB) keyPair.getPublic();
}
......@@ -92,7 +92,7 @@ public abstract class InstanceIdentityProvider<PUB extends PublicKey, PRIV exten
*/
@SuppressWarnings("unchecked")
@CheckForNull
public PRIV getPrivateKey() {
protected PRIV getPrivateKey() {
KeyPair keyPair = getKeyPair();
return keyPair == null ? null : (PRIV) keyPair.getPrivate();
}
......@@ -104,7 +104,7 @@ public abstract class InstanceIdentityProvider<PUB extends PublicKey, PRIV exten
* @return the certificate. {@code null} if {@link #getKeyPair()} is {@code null}.
*/
@CheckForNull
public abstract X509Certificate getCertificate();
protected abstract X509Certificate getCertificate();
/**
* Holds information about the paired keytypes that can be used to form the various identity keys.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册