KeyUsage
Defines the purpose of the key contained in the certificate.
struct KeyUsageThis usage restriction may be employed when a key that could conceptually be used for more than one operation (such as an RSA key) is to be restricted.
Defines the purpose of the key contained in the certificate.
struct KeyUsageThis usage restriction may be employed when a key that could conceptually be used for more than one operation (such as an RSA key) is to be restricted.
import X509A library for working with X.509 certificates.
struct AuthorityInformationAccessProvides details on how to access information about the certificate issuer.
struct AuthorityKeyIdentifierProvides information about the public key corresponding to the private key that was used to sign a specific certificate.
enum BasicConstraintsIdentifies whether the subject of the certificate is a CA and the maximum verification depth of valid certificate paths that include this certificate.
struct ExtendedKeyUsageIndicates 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 NameConstraintsConstraints the namespace within which all subject names issued by a given CA must reside.
struct SubjectAlternativeNamesAllows identities to be bound to the subject of a certificate.
struct SubjectKeyIdentifierProvides a means of identifying a certificate that contains a particular public key.
@frozen struct Critical<BaseExtension> where BaseExtension : CertificateExtensionConvertibleMarks a given CertificateExtensionConvertible value as critical.
protocol CertificateExtensionConvertibleConforming types are capable of being erased into Extension values.
protocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Escapableprotocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init() Construct a KeyUsage extension with no usages set.
init(_ ext: Certificate.Extension) throws Create a new KeyUsage object by unwrapping a Extension.
init(digitalSignature: Bool = false, nonRepudiation: Bool = false, keyEncipherment: Bool = false, dataEncipherment: Bool = false, keyAgreement: Bool = false, keyCertSign: Bool = false, cRLSign: Bool = false, encipherOnly: Bool = false, decipherOnly: Bool = false) Construct a KeyUsage extension with some usages set.
var cRLSign: Bool { get set }This is true when the subject public key is used for verifying signatures on certificate revocation lists.
var dataEncipherment: Bool { get set }This is true when the subject public key is used to encrypt raw data directly, without the use of an intervening symmetric cipher.
var debugDescription: String { get }var decipherOnly: Bool { get set }This only has meaning when the keyAgreement field is also true. When true in that case, the subject public key may only be used for decrypting data while performing key agreement.
var description: String { get }var digitalSignature: Bool { get set }This is true when the subject public key is used for verifying digital signatures, other than signatures used in certificates (covered by keyCertSign) or in CRLs (covered by cRLSign).
var encipherOnly: Bool { get set }This only has meaning when the keyAgreement field is also true. When true in that case, the subject public key may only be used for encrypting data while performing key agreement.
var keyAgreement: Bool { get set }This is true when the subject public key is used for key agreement.
var keyCertSign: Bool { get set }This is true when the subject public key is used for verifying signatures on certificates.
var keyEncipherment: Bool { get set }This is true when the subject public key is used to encrypt private or secret keys, e.g. for key transport.
var nonRepudiation: Bool { get set }This is true when the subject public key is used to verify digital signatures used to provide a non-repudiation service that protects against the signing entity denying some action. This does not cover signatures used in certificates (covered by keyCertSign) or in CRLs (cRLSign).
func makeCertificateExtension() throws -> Certificate.Extension static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.