fix cert parsing for ios 12
This commit is contained in:
parent
0157c8ec7c
commit
fb323b3033
|
@ -10,9 +10,6 @@ import Foundation
|
|||
extension SecCertificate {
|
||||
var data: Data {
|
||||
let serverCertificateCFData = SecCertificateCopyData(self)
|
||||
let data = CFDataGetBytePtr(serverCertificateCFData)
|
||||
let size = CFDataGetLength(serverCertificateCFData)
|
||||
let certificateData = NSData(bytes: data, length: size)
|
||||
return Data(certificateData)
|
||||
return serverCertificateCFData as Data
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,6 @@ import Foundation
|
|||
extension SecCertificate {
|
||||
var data: Data {
|
||||
let serverCertificateCFData = SecCertificateCopyData(self)
|
||||
let data = CFDataGetBytePtr(serverCertificateCFData)
|
||||
let size = CFDataGetLength(serverCertificateCFData)
|
||||
let certificateData = NSData(bytes: data, length: size)
|
||||
return Data(certificateData)
|
||||
return serverCertificateCFData as Data
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue