mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-03-17 00:00:03 +08:00
Test parsing PEM data with incorrect value
This commit is contained in:
@@ -39,5 +39,18 @@ class OpenVPNCertificateTests: XCTestCase {
|
||||
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