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 SecIdentitys for SSL. Two particular use cases are https://github.com/apple/swift-nio-ssl/issues/484#issuecomment-2410375188 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.
Motivation
It would be handy to provide an API to create PKCS#12 files from a list of
NIOSSLCertificates
and aNIOSSLPrivateKey
. This would be particularly useful when dealing with Network.framework/NIOTransportServices/Security.framework, which useSecIdentity
s for SSL. Two particular use cases are https://github.com/apple/swift-nio-ssl/issues/484#issuecomment-2410375188 andgrpc-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.