We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6c6eedb + a7ff377 commit 02a4730Copy full SHA for 02a4730
Sources/TLS/Certificates.swift
@@ -51,7 +51,7 @@ public enum Certificates {
51
52
extension Certificates {
53
public static var openbsd: Certificates {
54
- let root = #file.characters
+ let root = #file.toCharacterSequence()
55
.split(separator: "/", omittingEmptySubsequences: false)
56
.dropLast(3)
57
.map { String($0) }
@@ -98,3 +98,15 @@ fileprivate func fileExists(_ path: String) -> Bool {
98
return access(baseAddress, R_OK) == 0
99
}
100
101
+
102
+extension String {
103
+ #if swift(>=4.0)
104
+ internal func toCharacterSequence() -> String {
105
+ return self
106
+ }
107
+ #else
108
+ internal func toCharacterSequence() -> CharacterView {
109
+ return self.characters
110
111
+ #endif
112
+}
0 commit comments