Skip to content

Commit

Permalink
Add #if swift for SecCertificateCopyKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Lees11 committed Jun 27, 2019
1 parent bdbab61 commit f27ffb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Sources/CryptorRSA/CryptorRSAKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,14 @@ extension CryptorRSA {
}

var key: SecKey? = nil

#if swift(>=4.2)
if #available(macOS 10.14, iOS 12.0, watchOS 5.0, *) {

key = SecCertificateCopyKey(certData)

} else {

}
#endif
if key == nil {

#if os(macOS)

Expand Down

0 comments on commit f27ffb8

Please sign in to comment.