Files
swift-nio-ssl/Sources/NIOSSL/SSLInit.swift
T
Cory Benfield ae5f9a3840 Stop guarding implementationOnly (#266)
Motivation:

When we added support for implementationOnly imports, we guarded them
behind a maximum compiler version to prevent the possibility of the
spelling breaking in a future compiler release. This was pessimistic and
largely unnecessary. If the spelling does change in a future compiler
release, we can always ship a patch update that adds the compiler guard
to fix older versions. The solution, as it stands, will require trivial
patches every six months to maintain, which is much messier than just
removing the upper bound.

Modifications:

- Remove the upper bound on the compiler version for
  `@_implementationOnly` import.

Result:

Fewer trivial patches.
2021-01-25 14:16:23 +00:00

27 lines
839 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)
@_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
}