You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/NIOSSL/TLSConfiguration.swift
+58-3Lines changed: 58 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,20 +28,20 @@ public enum TLSVersion {
28
28
}
29
29
30
30
/// Places NIOSSL can obtain certificates from.
31
-
publicenumNIOSSLCertificateSource{
31
+
publicenumNIOSSLCertificateSource:Hashable{
32
32
@available(*, deprecated, message:"Use 'NIOSSLCertificate.fromPEMFile(_:)' to load the certificate(s) and use the '.certificate(NIOSSLCertificate)' case to provide them as a source")
33
33
case file(String)
34
34
case certificate(NIOSSLCertificate)
35
35
}
36
36
37
37
/// Places NIOSSL can obtain private keys from.
38
-
publicenumNIOSSLPrivateKeySource{
38
+
publicenumNIOSSLPrivateKeySource:Hashable{
39
39
case file(String)
40
40
case privateKey(NIOSSLPrivateKey)
41
41
}
42
42
43
43
/// Places NIOSSL can obtain a trust store from.
44
-
publicenumNIOSSLTrustRoots{
44
+
publicenumNIOSSLTrustRoots:Hashable{
45
45
/// Path to either a file of CA certificates in PEM format, or a directory containing CA certificates in PEM format.
46
46
///
47
47
/// If a path to a file is provided, the file can contain several CA certificates identified by
@@ -507,3 +507,58 @@ public struct TLSConfiguration {
507
507
additionalTrustRoots: additionalTrustRoots)
508
508
}
509
509
}
510
+
511
+
// MARK: BestEffortHashable
512
+
extensionTLSConfiguration{
513
+
/// Returns a best effort result of whether two `TLSConfiguration` objects are equal.
514
+
///
515
+
/// The "best effort" stems from the fact that we are checking the pointer to the `keyLogCallback` closure.
516
+
///
517
+
/// - warning: You should probably not use this function. This function can return false-negatives, but not false-positives.
0 commit comments