init(oid:critical:value:)
Construct a new extension from its constituent parts.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(oid: ASN1ObjectIdentifier, critical: Bool, value: ArraySlice<UInt8>)
Construct a new extension from its constituent parts.
init(oid: ASN1ObjectIdentifier, critical: Bool, value: ArraySlice<UInt8>)
s4X50911CertificateV9ExtensionV3oid8critical5valueAE9SwiftASN10H16ObjectIdentifierV_Sbs10ArraySliceVys5UInt8VGtcfc
What are these?86DHC
import X509
A library for working with X.509 certificates.
struct Extension
A general-purpose representation of a specific X.509 extension.
struct Certificate
struct ASN1ObjectIdentifier
An Object Identifier is a representation of some kind of object.
@frozen struct Bool
A value type whose instances are either true
or false
.
@frozen struct ArraySlice<Element>
A slice of an Array
, ContiguousArray
, or ArraySlice
instance.
@frozen struct UInt8
An 8-bit unsigned integer value type.
init(_ nameConstraints: NameConstraints, critical: Bool) throws
Construct an opaque Extension
from this Name Constraints extension.
init(_ basicConstraints: BasicConstraints, critical: Bool) throws
Construct an opaque Extension
from this Basic Constraints extension.
init(_ eku: ExtendedKeyUsage, critical: Bool) throws
Construct an opaque Extension
from this Extended Key Usage extension.
init(_ ski: SubjectKeyIdentifier, critical: Bool) throws
Construct an opaque Extension
from this Subject Key Identifier extension.
init(_ aki: AuthorityKeyIdentifier, critical: Bool) throws
Construct an opaque Extension
from this AKI extension.
init(_ san: SubjectAlternativeNames, critical: Bool) throws
Construct an opaque Extension
from this Subject Alternative Name extension.
init(_ aia: AuthorityInformationAccess, critical: Bool) throws
Construct an opaque Extension
from this AIA extension.
init(_ keyUsage: KeyUsage, critical: Bool) throws
Construct an opaque Extension
from this Key Usage extension.
init(derEncoded rootNode: ASN1Node, withIdentifier identifier: ASN1Identifier) throws
static var defaultIdentifier: ASN1Identifier { get }
var critical: Bool
Whether this extension must be processed in order to trust the certificate.
var description: String { get }
var oid: ASN1ObjectIdentifier
The identifier for this extension type.
var value: ArraySlice<UInt8>
The encoded bytes of the value of this extension.
func makeCertificateExtension() -> Certificate.Extension
func serialize(into coder: inout DER.Serializer, withIdentifier identifier: ASN1Identifier) throws