init(derEncoded:withIdentifier:)
Certificate.swift:316- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(derEncoded rootNode: ASN1Node, withIdentifier identifier: ASN1Identifier) throws
init(derEncoded rootNode: ASN1Node, withIdentifier identifier: ASN1Identifier) throws
s4X50911CertificateV10derEncoded14withIdentifierAC9SwiftASN10H4NodeV_AF0hF0VtKcfc
What are these?3GKYT
import X509
A library for working with X.509 certificates.
struct Certificate
struct ASN1Node
An ASN1Node
is a single entry in the ASN.1 representation of a data structure.
struct ASN1Identifier
An ASN1Identifier
is a representation of the abstract notion of an ASN.1 identifier.
init(version: Version, serialNumber: SerialNumber, publicKey: PublicKey, notValidBefore: Date, notValidAfter: Date, issuer: DistinguishedName, subject: DistinguishedName, extensions: Extensions, issuerPrivateKey: PrivateKey) throws
Construct a certificate from constituent parts, signed by an issuer key.
init(version: Version, serialNumber: SerialNumber, publicKey: PublicKey, notValidBefore: Date, notValidAfter: Date, issuer: DistinguishedName, subject: DistinguishedName, signatureAlgorithm: SignatureAlgorithm, extensions: Extensions, issuerPrivateKey: PrivateKey) throws
Construct a certificate from constituent parts, signed by an issuer key.
static var defaultIdentifier: ASN1Identifier { get }
static var defaultPEMDiscriminator: String { get }
var description: String { get }
var extensions: Extensions { get }
The extensions on this certificate.
var issuer: DistinguishedName { get }
The DistinguishedName
of the issuer of this certificate.
var notValidAfter: Date { get }
The date after which this certificate is not valid.
var notValidBefore: Date { get }
The date before which this certificate is not valid.
var publicKey: PublicKey { get }
The public key associated with this certificate.
var serialNumber: SerialNumber { get }
The serial number of this certificate.
let signature: Signature
The signature attached to this certificate.
let signatureAlgorithm: SignatureAlgorithm
The signature algorithm used to produce signature
.
var subject: DistinguishedName { get }
The DistinguishedName
of the subject of this certificate.
let tbsCertificateBytes: ArraySlice<UInt8>
The bytes of the TBSCertificate
structure.
var version: Version { get }
The X.509 version of this certificate.
func serialize(into coder: inout DER.Serializer, withIdentifier identifier: ASN1Identifier) throws
struct Extension
A general-purpose representation of a specific X.509 extension.
struct Extensions
A representation of a collection of X.509 extensions.
struct PrivateKey
A private key that can be used with a certificate.
struct PublicKey
A public key that can be used with a certificate.
struct SerialNumber
A number that uniquely identifies a certificate issued by a specific certificate authority.
struct Signature
An abstract representation of the cryptographic signature on a certificate.
struct SignatureAlgorithm
A representation of a kind of signature algorithm.
struct Version
The X.509 certificate version.