@@ -2827,7 +2827,7 @@ private OpenPGPSignatureChain(OpenPGPSignatureChain copy)
2827
2827
2828
2828
public OpenPGPComponentSignature getSignature ()
2829
2829
{
2830
- return getHeadLink ().getSignature ();
2830
+ return getLeafLink ().getSignature ();
2831
2831
}
2832
2832
2833
2833
/**
@@ -2839,7 +2839,7 @@ public OpenPGPComponentSignature getSignature()
2839
2839
public OpenPGPSignatureChain plus (OpenPGPComponentSignature sig ,
2840
2840
OpenPGPCertificateComponent targetComponent )
2841
2841
{
2842
- if (getHeadKey () != sig .getIssuerComponent ())
2842
+ if (getLeafLinkTargetKey () != sig .getIssuerComponent ())
2843
2843
{
2844
2844
throw new IllegalArgumentException ("Chain head is not equal to link issuer." );
2845
2845
}
@@ -2863,17 +2863,17 @@ public Link getRootLink()
2863
2863
return chainLinks .get (0 );
2864
2864
}
2865
2865
2866
- public OpenPGPComponentKey getRootKey ()
2866
+ public OpenPGPComponentKey getRootLinkIssuer ()
2867
2867
{
2868
- return getRootLink ().issuer ;
2868
+ return getRootLink ().getSignature (). getIssuer () ;
2869
2869
}
2870
2870
2871
- public Link getHeadLink ()
2871
+ public Link getLeafLink ()
2872
2872
{
2873
2873
return chainLinks .get (chainLinks .size () - 1 );
2874
2874
}
2875
2875
2876
- public OpenPGPComponentKey getHeadKey ()
2876
+ public OpenPGPComponentKey getLeafLinkTargetKey ()
2877
2877
{
2878
2878
return getSignature ().getTargetKeyComponent ();
2879
2879
}
@@ -2966,7 +2966,7 @@ public boolean isEffectiveAt(Date evaluationDate)
2966
2966
public boolean isValid ()
2967
2967
throws PGPSignatureException
2968
2968
{
2969
- OpenPGPComponentKey rootKey = getRootKey ();
2969
+ OpenPGPComponentKey rootKey = getRootLinkIssuer ();
2970
2970
if (rootKey == null )
2971
2971
{
2972
2972
throw new MissingIssuerCertException (getRootLink ().signature , "Missing issuer certificate." );
@@ -3026,7 +3026,7 @@ public int compareTo(OpenPGPSignatureChain other)
3026
3026
return compare ;
3027
3027
}
3028
3028
3029
- compare = -getHeadLink ().since ().compareTo (other .getHeadLink ().since ());
3029
+ compare = -getLeafLink ().since ().compareTo (other .getLeafLink ().since ());
3030
3030
if (compare != 0 )
3031
3031
{
3032
3032
return compare ;
@@ -3325,7 +3325,7 @@ public OpenPGPSignatureChains fromOrigin(OpenPGPComponentKey root)
3325
3325
OpenPGPSignatureChains chainsFromRoot = new OpenPGPSignatureChains (root );
3326
3326
for (OpenPGPSignatureChain chain : chains )
3327
3327
{
3328
- OpenPGPComponentKey chainRoot = chain .getRootKey ();
3328
+ OpenPGPComponentKey chainRoot = chain .getRootLinkIssuer ();
3329
3329
if (chainRoot == root )
3330
3330
{
3331
3331
chainsFromRoot .add (chain );
0 commit comments