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
387 stars 139 forks source link

Add support for owned references to `NIOSSLObjectIdentifier` #358

Closed dnadoba closed 2 years ago

dnadoba commented 2 years ago

Motivation

BoringSSL can give us a pointer to an OID which is part of a larger allocation that can not separately be deallocated. This is the case for Certificate Extensions where each extension has an OID but the memory of this OID is actually owned by the certificate.

Modification

Result

We can vend users a NIOSSLObjectIdentifier for e.g. a Certificate Extension OID without needing to do a copy first.