Merge pull request #1822 from darkang3lz92/fix-ios12-cert-parse-issue

fix cert parsing for ios 12
This commit is contained in:
Lorenzo Pichilli 2023-11-10 12:05:28 +01:00 committed by GitHub
commit 98ff3e58e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View File

@ -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
}
}

View File

@ -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
}
}