forked from finagolfin/swift-android-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swift-nio-ssl-test.patch
59 lines (52 loc) · 1.83 KB
/
swift-nio-ssl-test.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff --git a/Tests/NIOSSLTests/NIOSSLTestHelpers.swift b/Tests/NIOSSLTests/NIOSSLTestHelpers.swift
index 494186e..090ceb8 100644
--- a/Tests/NIOSSLTests/NIOSSLTestHelpers.swift
+++ b/Tests/NIOSSLTests/NIOSSLTestHelpers.swift
@@ -19,6 +19,10 @@ import NIOEmbedded
@testable import NIOSSL
+#if canImport(Android)
+import Android
+#endif
+
let samplePemCert = """
-----BEGIN CERTIFICATE-----
MIIGGzCCBAOgAwIBAgIJAJ/X0Fo0ynmEMA0GCSqGSIb3DQEBCwUAMIGjMQswCQYD
diff --git a/Tests/NIOSSLTests/SSLCertificateTest.swift b/Tests/NIOSSLTests/SSLCertificateTest.swift
index 18d3a1a..9bbd447 100644
--- a/Tests/NIOSSLTests/SSLCertificateTest.swift
+++ b/Tests/NIOSSLTests/SSLCertificateTest.swift
@@ -18,6 +18,10 @@ import XCTest
@testable import NIOSSL
+#if canImport(Android)
+import Android
+#endif
+
let multiSanCert = """
-----BEGIN CERTIFICATE-----
MIIDEzCCAfugAwIBAgIURiMaUmhI1Xr0mZ4p+JmI0XjZTaIwDQYJKoZIhvcNAQEL
diff --git a/Tests/NIOSSLTests/SSLPKCS12BundleTest.swift b/Tests/NIOSSLTests/SSLPKCS12BundleTest.swift
index 609b7c3..4e6accc 100644
--- a/Tests/NIOSSLTests/SSLPKCS12BundleTest.swift
+++ b/Tests/NIOSSLTests/SSLPKCS12BundleTest.swift
@@ -11,6 +11,9 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
+#if canImport(Android)
+import Android
+#endif
import Foundation
import NIOCore
diff --git a/Tests/NIOSSLTests/SSLPrivateKeyTests.swift b/Tests/NIOSSLTests/SSLPrivateKeyTests.swift
index 7ef2dfd..a8c6ac1 100644
--- a/Tests/NIOSSLTests/SSLPrivateKeyTests.swift
+++ b/Tests/NIOSSLTests/SSLPrivateKeyTests.swift
@@ -18,6 +18,10 @@ import XCTest
@testable import NIOSSL
+#if canImport(Android)
+import Android
+#endif
+
class SSLPrivateKeyTest: XCTestCase {
static var pemKeyFilePath: String! = nil
static var derKeyFilePath: String! = nil