@@ -1227,14 +1227,16 @@ public OpenPGPSignatureChains getSignatureChains()
12271227 }
12281228
12291229 /**
1230- * Return the (at evaluation time) latest certification signature binding this component.
1230+ * Return the (at evaluation time) latest self certification signature binding this component.
12311231 *
12321232 * @param evaluationTime reference time
12331233 * @return latest component certification signature
12341234 */
12351235 public OpenPGPComponentSignature getCertification (Date evaluationTime )
12361236 {
1237- OpenPGPSignatureChain certification = getSignatureChains ().getCertificationAt (evaluationTime );
1237+ OpenPGPSignatureChain certification = getSignatureChains ()
1238+ .fromOrigin (getCertificate ().getPrimaryKey ())
1239+ .getCertificationAt (evaluationTime );
12381240 if (certification != null )
12391241 {
12401242 return certification .getSignature ();
@@ -1243,14 +1245,16 @@ public OpenPGPComponentSignature getCertification(Date evaluationTime)
12431245 }
12441246
12451247 /**
1246- * Return the (at evaluation time) latest revocation signature revoking this component.
1248+ * Return the (at evaluation time) latest self revocation signature revoking this component.
12471249 *
12481250 * @param evaluationTime reference time
12491251 * @return latest component revocation signature
12501252 */
12511253 public OpenPGPComponentSignature getRevocation (Date evaluationTime )
12521254 {
1253- OpenPGPSignatureChain revocation = getSignatureChains ().getRevocationAt (evaluationTime );
1255+ OpenPGPSignatureChain revocation = getSignatureChains ()
1256+ .fromOrigin (getCertificate ().getPrimaryKey ())
1257+ .getRevocationAt (evaluationTime );
12541258 if (revocation != null )
12551259 {
12561260 return revocation .getSignature ();
@@ -2113,7 +2117,9 @@ public Date getCreationTime()
21132117 @ Override
21142118 public OpenPGPComponentSignature getLatestSelfSignature (Date evaluationTime )
21152119 {
2116- OpenPGPSignatureChain currentDKChain = getSignatureChains ().getChainAt (evaluationTime );
2120+ OpenPGPSignatureChain currentDKChain = getSignatureChains ()
2121+ .fromOrigin (getCertificate ().getPrimaryKey ())
2122+ .getChainAt (evaluationTime );
21172123 if (currentDKChain != null && !currentDKChain .chainLinks .isEmpty ())
21182124 {
21192125 return currentDKChain .getSignature ();
@@ -2299,7 +2305,9 @@ public OpenPGPComponentSignature getLatestDirectKeySelfSignature()
22992305 */
23002306 public OpenPGPComponentSignature getLatestDirectKeySelfSignature (Date evaluationTime )
23012307 {
2302- OpenPGPSignatureChain currentDKChain = getCertificate ().getAllSignatureChainsFor (this )
2308+ OpenPGPSignatureChain currentDKChain = getCertificate ()
2309+ .getAllSignatureChainsFor (this )
2310+ .fromOrigin (this )
23032311 .getCertificationAt (evaluationTime );
23042312 if (currentDKChain != null && !currentDKChain .chainLinks .isEmpty ())
23052313 {
@@ -2327,7 +2335,9 @@ public OpenPGPComponentSignature getLatestKeyRevocationSelfSignature()
23272335 */
23282336 public OpenPGPComponentSignature getLatestKeyRevocationSelfSignature (Date evaluationTime )
23292337 {
2330- OpenPGPSignatureChain currentRevocationChain = getCertificate ().getAllSignatureChainsFor (this )
2338+ OpenPGPSignatureChain currentRevocationChain = getCertificate ()
2339+ .getAllSignatureChainsFor (this )
2340+ .fromOrigin (this )
23312341 .getRevocationAt (evaluationTime );
23322342 if (currentRevocationChain != null && !currentRevocationChain .chainLinks .isEmpty ())
23332343 {
@@ -2676,7 +2686,9 @@ public OpenPGPPrimaryKey getPrimaryKey()
26762686 @ Override
26772687 public OpenPGPComponentSignature getLatestSelfSignature (Date evaluationTime )
26782688 {
2679- OpenPGPSignatureChain currentChain = getSignatureChains ().getChainAt (evaluationTime );
2689+ OpenPGPSignatureChain currentChain = getSignatureChains ()
2690+ .fromOrigin (getPrimaryKey ())
2691+ .getChainAt (evaluationTime );
26802692 if (currentChain != null && !currentChain .chainLinks .isEmpty ())
26812693 {
26822694 return currentChain .getSignature ();
0 commit comments