mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-22 04:30:44 +00:00
Do not log the caCerts value if PKCS#12 parsing goes haywire (#571)
The `caCerts` value is, from Swift's perspective, merely an `OpaquePointer?`; logging its value as part of a `preconditionFailure()` is not particularly useful. In addition, including it in the log message causes GitHub's CodeQL code analysis to inaccurately report a high-severity information disclosure vulnerability in any repo using it which has `swift-nio-ssl` as a direct or indirect dependency. Since logging it serves no useful purpose anyway, might as well get rid of it.
This commit is contained in:
1 parent
8c179eebff
commit
88c4694e15
1 file changed
+1
-1
@@ -69,7 +69,7 @@ public struct NIOSSLPKCS12Bundle: Hashable {
|
||||
|
||||
for idx in 0..<certStackSize {
|
||||
guard let stackCertPtr = CNIOBoringSSL_sk_X509_value(caCerts, idx) else {
|
||||
preconditionFailure("Unable to get cert \(idx) from stack \(String(describing: caCerts))")
|
||||
preconditionFailure("Unable to get cert \(idx) from stack")
|
||||
}
|
||||
certs.append(NIOSSLCertificate.fromUnsafePointer(takingOwnership: stackCertPtr))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user