init(version:subject:privateKey:attributes:signatureAlgorithm:)
Construct a CSR for a specific private key.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(version: Version, subject: DistinguishedName, privateKey: Certificate.PrivateKey, attributes: Attributes, signatureAlgorithm: Certificate.SignatureAlgorithm) throws
Parameters
- version
The CSR version.
- subject
The
DistinguishedName
of the subject of this CSR- privateKey
The private key associated with this CSR.
- attributes
The attributes associated with this CSR
- signatureAlgorithm
The signature algorithm to use for the signature on this CSR.
This API can be used to construct a certificate signing request that can be passed to a certificate authority. It will correctly generate a signature over the request.