mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Test parsing PEM data with incorrect value
This commit is contained in:
@@ -39,5 +39,18 @@ class OpenVPNCertificateTests: XCTestCase {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testCertificateFromEmptyPEM() {
|
||||||
|
let caData = Data(count: 1024)
|
||||||
|
|
||||||
|
let certificate: OpenVPNCertificate
|
||||||
|
do {
|
||||||
|
certificate = try OpenVPNCertificate(pem: caData)
|
||||||
|
} catch {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTFail("Initialization with empty PEM data should fail")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user