apple / swift-nio-ssl

TLS Support for SwiftNIO, based on BoringSSL.
https://swiftpackageindex.com/apple/swift-nio-ssl/main/documentation/niossl
Apache License 2.0
392 stars 140 forks source link

Use EVP_PKEY_assign_RSA instead of EVP_PKEY_assign #434

Closed davidben closed 1 year ago

davidben commented 1 year ago

EVP_PKEY_assign_RSA, at least in C, is more type-safe. It also is compatible with an upcoming BoringSSL change to make the RSA struct opaque. For some Swift reasons I don't fully understand (but relating to the OpaquePointer mess), when RSA becomes opaque, EVP_PKEY_assign no longer works.

I assume it could be made to work with some appropriate cast, but since EVP_PKEY_assign_RSA already exists (and will, in the future, be more binary-size-friendly), just use that.

Lukasa commented 1 year ago

@swift-server-bot add to allowlist