-
Notifications
You must be signed in to change notification settings - Fork 143
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
expose CNIOBoringSSL #484
Comments
Hi @xlc, thanks for asking. We discussed this on the Swift forums when we originally proposed cutting over to BoringSSL, but I'll reiterate here:
When we update our copy of BoringSSL, we fairly frequently get compile errors that we have to fix. This is despite the fact that we only use a relatively small amount of the API surface. Across the whole of the API surface we'd never be able to revise it. What features do you want from BoringSSL? We may have good solutions for them in Swift in other packages. |
Thanks for the explanation. That's a bit unfortunate but make sense. Moreover, I am using https://github.com/microsoft/msquic as the QUIC implementation, and it requires PKCS12 format if I want to pass the keys in-memory (i.e. not loading from a PEM file). I discovered CNIOBoringSSL from this issue: apple/swift-certificates#114 |
Ok, so let's turn that into a series of feature requests on the higher-level projects. I think there are two features we need:
|
That sounds good. Happy to help testing if needed. I decided to use openssl for now and see if we can refactor the low level C API usage to Swift API when they are ready. |
## Motivation It would be handy to provide an API to create PKCS#12 files from a list of `NIOSSLCertificates` and a `NIOSSLPrivateKey`. This would be particularly useful when dealing with Network.framework/NIOTransportServices/Security.framework, which use `SecIdentity`s for SSL. Two particular use cases are #484 (comment) and `grpc-swift-nio-transport`, which would use this API for testing the NIOTS transport implementation. ## Modifications This PR adds a static method to `NIOSSLPKCS12Bundle` that creates a PKCS#12 file from the given array of certificates + private key, and returns it as an array of bytes. ## Result PKCS#12 files can be created using NIOSSL.
Some updates. For Ed25519 keys, see apple/swift-certificates#205. For PKCS#12, see #486. Would you like to investigate these two options for your use-case? |
Thanks! I think those will work for us. Here is our current C code BTW https://github.com/open-web3-stack/boka/blob/master/Networking/Sources/CHelpers/helpers.c |
We would like to use some low level openssl features directly and wanting to use
CNIOBoringSSL
. What is the reason of not exposing CNIOBoringSSL? If it is just some compiler warnings, some compiler flags should address them. Happy to contribute if needed.The text was updated successfully, but these errors were encountered: