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

Make `NIOSSLCertificate._subjectAlternativeNames()` return type non-optional #389

Closed dnadoba closed 2 years ago

dnadoba commented 2 years ago

Motivation

NIOSSLCertificate._subjectAlternativeNames() can currently return nil or an empty _SubjectAlternativeNames collection. There is no semantic difference in these two cases.

Modification

Result

We now return an empty _SubjectAlternativeNames instead of nil

Source Compatibility

This is a non-breaking change even though this is public API because it has an underscore prefix. It is therefore unstable and allowed to change in a minor release.

Lukasa commented 2 years ago

Merging over the API breakage checker.