Merge pull request #1822 from darkang3lz92/fix-ios12-cert-parse-issue
fix cert parsing for ios 12
This commit is contained in:
commit
98ff3e58e3
|
@ -10,9 +10,6 @@ import Foundation
|
||||||
extension SecCertificate {
|
extension SecCertificate {
|
||||||
var data: Data {
|
var data: Data {
|
||||||
let serverCertificateCFData = SecCertificateCopyData(self)
|
let serverCertificateCFData = SecCertificateCopyData(self)
|
||||||
let data = CFDataGetBytePtr(serverCertificateCFData)
|
return serverCertificateCFData as Data
|
||||||
let size = CFDataGetLength(serverCertificateCFData)
|
|
||||||
let certificateData = NSData(bytes: data, length: size)
|
|
||||||
return Data(certificateData)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,6 @@ import Foundation
|
||||||
extension SecCertificate {
|
extension SecCertificate {
|
||||||
var data: Data {
|
var data: Data {
|
||||||
let serverCertificateCFData = SecCertificateCopyData(self)
|
let serverCertificateCFData = SecCertificateCopyData(self)
|
||||||
let data = CFDataGetBytePtr(serverCertificateCFData)
|
return serverCertificateCFData as Data
|
||||||
let size = CFDataGetLength(serverCertificateCFData)
|
|
||||||
let certificateData = NSData(bytes: data, length: size)
|
|
||||||
return Data(certificateData)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue