makeCertificateExtension
ExtendedKeyUsage.swift:341- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
func makeCertificateExtension() throws -> Certificate.Extension
func makeCertificateExtension() throws -> Certificate.Extension
s4X50916ExtendedKeyUsageV24makeCertificateExtensionAA0F0V0G0VyKF
What are these?9IMGD
import X509
A library for working with X.509 certificates.
struct ExtendedKeyUsage
Indicates one or more purposes for which the certified public key may be used, in addition to or instead of the the purposes indicated in the KeyUsage
extension.
struct Certificate
struct Extension
A general-purpose representation of a specific X.509 extension.
init()
Create a new empty ExtendedKeyUsage
object with no usages.
init<Usages>(_ usages: Usages) throws where Usages : Sequence, Usages.Element == ExtendedKeyUsage.Usage
Construct an ExtendedKeyUsage
extension containing the given usages.
init(_ ext: Certificate.Extension) throws
Create a new ExtendedKeyUsage
object by unwrapping a Extension
.
var debugDescription: String { get }
var description: String { get }
var endIndex: Int { get }
var startIndex: Int { get }
subscript(position: Int) -> Usage { get }
@discardableResult mutating func append(_ usage: Element) -> (inserted: Bool, index: Int)
Append a new usage
to the end of the ExtendedKeyUsage
, if it doesn’t already contain it.
@discardableResult mutating func insert(_ usage: Element, at index: Int) -> (inserted: Bool, index: Int)
Insert a new usage
to this set at the specified index, if self
doesn’t already contain it.
@discardableResult mutating func remove(_ usage: Element) -> Element?
Removes the given usage
from self
, if present.
struct Usage
An acceptable usage for a certificate as attested in an ExtendedKeyUsage
extension.