Files
swift-nio-ssl/Sources/NIOSSL/SSLInit.swift
T
Johannes WeissandCory Benfield e0049a1600 @_implementationOnly also for Swift 5.3 (#212)
Motivation:

@_implementationOnly also works in Swift 5.3, let's use it.

Modification:

Use @_implementationOnly for Swift 5.1 ... 5.3

Result:

Proper 5.3 support.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-05-01 08:01:28 +01:00

27 lines
857 B
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if compiler(>=5.1) && compiler(<5.4)
@_implementationOnly import CNIOBoringSSL
#else
import CNIOBoringSSL
#endif
/// Initialize BoringSSL. Note that this function IS NOT THREAD SAFE, and so must be called inside
/// either an explicit or implicit dispatch_once.
func initializeBoringSSL() -> Bool {
CNIOBoringSSL_CRYPTO_library_init()
return true
}