apple / swift-certificates

An implementation of X.509 for Swift
https://swiftpackageindex.com/apple/swift-certificates/main/documentation/x509
Apache License 2.0
232 stars 54 forks source link

ambiguous codelink in OCSPPolicy.swift:71 #143

Open tayloraswift opened 1 year ago

tayloraswift commented 1 year ago

swift-unidoc found an ambiguous codelink in OCSPPolicy.swift:71. there are two possible link targets.

/swift-certificates/checkouts/swift-certificates/Sources/X509/OCSP/OCSPPolicy.swift:72:161: warning: codelink 'PolicyEvaluationResult.failsToMeetPolicy(reason:)' is ambiguous
The OCSP query is considered unsuccessful and will fail verification in both ``OCSPFailureMode/soft`` and ``OCSPFailureMode/hard`` failure mode.
The certificate is then considered to not meet the ``OCSPVerifierPolicy`` and ``OCSPVerifierPolicy/chainMeetsPolicyRequirements(chain:)`` will return ``PolicyEvaluationResult/failsToMeetPolicy(reason:)`` with the given ``reason``.
                                                                                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
- Parameter reason: the reason why the OCSP query failed

(unknown) note: did you mean 'PolicyEvaluationResult.failsToMeetPolicy(reason:) [3E21]'? (static X509.PolicyEvaluationResult.failsToMeetPolicy(reason: @autoclosure @Sendable () -> Swift.String) -> X509.PolicyEvaluationResult)

(unknown) note: did you mean 'PolicyEvaluationResult.failsToMeetPolicy(reason:) [3TP9A]'? (static X509.PolicyEvaluationResult.failsToMeetPolicy(reason: X509.PolicyFailureReason) -> X509.PolicyEvaluationResult)
Lukasa commented 2 months ago

Sorry for missing this when it was filed at the time. Do you want to fix it up? The correct target is the second one.