nameConstraints
Loads the NameConstraints
extension, if it is present.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
var nameConstraints: NameConstraints? { get throws }
Throws if it is not possible to decode the name constraints extension.
Loads the NameConstraints
extension, if it is present.
var nameConstraints: NameConstraints? { get throws }
s4X50911CertificateV10ExtensionsV15nameConstraintsAA04NameE0VSgvp
What are these?GGSE
Throws if it is not possible to decode the name constraints extension.
import X509
A library for working with X.509 certificates.
struct Extensions
A representation of a collection of X.509 extensions.
struct Certificate
struct NameConstraints
Constraints the namespace within which all subject names issued by a given CA must reside.
init()
Produce a new empty Extensions container.
init<Elements>(_ extensions: Elements) throws where Elements : Sequence, Elements.Element == Certificate.Extension
Produce a new Extensions container from a collection of Extension
.
init(@ExtensionsBuilder builder: () throws -> Result<Certificate.Extensions, any Error>) throws
Construct a collection of extensions using the ExtensionsBuilder
syntax.
var authorityInformationAccess: AuthorityInformationAccess? { get throws }
Loads the AuthorityInformationAccess
extension, if it is present.
var authorityKeyIdentifier: AuthorityKeyIdentifier? { get throws }
Loads the AuthorityKeyIdentifier
extension, if it is present.
var basicConstraints: BasicConstraints? { get throws }
Loads the BasicConstraints
extension, if it is present.
var debugDescription: String { get }
var description: String { get }
var endIndex: Int { get }
var extendedKeyUsage: ExtendedKeyUsage? { get throws }
Loads the ExtendedKeyUsage
extension, if it is present.
var keyUsage: KeyUsage? { get throws }
Loads the KeyUsage
extension, if it is present.
var startIndex: Int { get }
var subjectAlternativeNames: SubjectAlternativeNames? { get throws }
Loads the SubjectAlternativeNames
extension, if it is present.
var subjectKeyIdentifier: SubjectKeyIdentifier? { get throws }
Loads the SubjectKeyIdentifier
extension, if it is present.
subscript(position: Int) -> Certificate.Extension { get }
subscript(oid oid: ASN1ObjectIdentifier) -> Certificate.Extension? { get set }
Look up a specific extension by its OID.
mutating func append(_ extension: Certificate.Extension) throws
Append a new Extension
into this set of Extensions
.
@discardableResult mutating func remove(_ oid: ASN1ObjectIdentifier) -> Certificate.Extension?
Removes the Extension
with the given oid
.
@discardableResult mutating func update(_ extension: Certificate.Extension) -> Certificate.Extension?
Updates the Extension
stored in the dictionary for the oid
of the extension
, or appends extension
if an Extension
with same oid
does not exist.