Usage
An acceptable usage for a certificate as attested in an ExtendedKeyUsage
extension.
struct Usage
An acceptable usage for a certificate as attested in an ExtendedKeyUsage
extension.
struct Usage
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.
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.
func makeCertificateExtension() throws -> Certificate.Extension
@discardableResult mutating func remove(_ usage: Element) -> Element?
Removes the given usage
from self
, if present.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(oid: ASN1ObjectIdentifier)
Constructs a Usage
from an opaque oid.
static let any: ExtendedKeyUsage.Usage
The public key may be used for any purpose.
static let certificateTransparency: ExtendedKeyUsage.Usage
The public key may be used for signing certificate transparency precertificates.
static let clientAuth: ExtendedKeyUsage.Usage
The public key may be used for TLS web client authentication.
static let codeSigning: ExtendedKeyUsage.Usage
The public key may be used for signing of downloadable executable code.
static let emailProtection: ExtendedKeyUsage.Usage
The public key may be used for email protection.
static let ocspSigning: ExtendedKeyUsage.Usage
The public key may be used for signing OCSP responses.
static let serverAuth: ExtendedKeyUsage.Usage
The public key may be used for TLS web servers.
static let timeStamping: ExtendedKeyUsage.Usage
The public key may be used for binding the hash of an object to a time.
var debugDescription: String { get }
var description: String { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.