Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 5 support #29

Merged
merged 2 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ matrix:
sudo: required
services: docker
env: DOCKER_IMAGE=ubuntu:16.04
- os: linux
dist: trusty
sudo: required
services: docker
env: DOCKER_IMAGE=ubuntu:16.04 SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT
- os: linux
dist: trusty
sudo: required
Expand All @@ -43,6 +48,10 @@ matrix:
- os: osx
osx_image: xcode10
sudo: required
- os: osx
osx_image: xcode10.1
sudo: required
env: SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT

before_install:
- git clone https://github.com/IBM-Swift/Package-Builder.git
Expand Down
2 changes: 1 addition & 1 deletion Sources/CryptorRSA/CryptorRSADigest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Foundation
///
/// Digest Handling Extension
///
public extension Data {
extension Data {

// MARK: Enums

Expand Down
4 changes: 2 additions & 2 deletions Sources/CryptorRSA/CryptorRSAErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Foundation
// MARK: -

@available(macOS 10.12, iOS 10.0, *)
public extension CryptorRSA {
extension CryptorRSA {

// MARK: Constants

Expand Down Expand Up @@ -98,7 +98,7 @@ public extension CryptorRSA {
///
/// - Returns: Error instance
///
init(code: Int, reason: String?) {
public init(code: Int, reason: String?) {

self.errorCode = Int32(code)
self.errorReason = reason
Expand Down
8 changes: 4 additions & 4 deletions Sources/CryptorRSA/CryptorRSAKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ import Foundation
// MARK: -

@available(macOS 10.12, iOS 10.0, *)
public extension CryptorRSA {
extension CryptorRSA {

// MARK: Type Aliases

#if os(Linux)

#if swift(>=4.2)

typealias NativeKey = OpaquePointer?
public typealias NativeKey = OpaquePointer?

#else

typealias NativeKey = UnsafeMutablePointer<RSA>
public typealias NativeKey = UnsafeMutablePointer<RSA>

#endif

#else

typealias NativeKey = SecKey
public typealias NativeKey = SecKey

#endif

Expand Down