|
|
|
|
|
Description |
An interface to X.509 certificate.
|
|
Synopsis |
|
|
|
|
Type
|
|
|
X509 is an opaque object that represents X.509 certificate.
|
|
|
|
|
Functions to manipulate certificate
|
|
|
newX509 creates an empty certificate. You must set the
following properties to and sign it (see signX509) to actually
use the certificate.
- Version
- See setVersion.
- Serial number
- See setSerialNumber.
- Issuer name
- See setIssuerName.
- Subject name
- See setSubjectName.
- Validity
- See setNotBefore and setNotAfter.
- Public Key
- See setPublicKey.
|
|
|
|
|
|
|
|
|
|
|
|
|
compareX509 cert1 cert2 compares two certificates.
|
|
|
:: X509 | The certificate to be signed.
| -> PKey | The private key to sign with.
| -> Maybe Digest | A hashing algorithm to use. If Nothing
the most suitable algorithm for the key
is automatically used.
| -> IO () | | signX509 signs a certificate with an issuer private key.
|
|
|
|
:: X509 | The certificate to be verified.
| -> PKey | The public key to verify with.
| -> IO VerifyStatus | | verifyX509 verifies a signature of certificate with an issuer
public key.
|
|
|
|
printX509 cert translates a certificate into human-readable
format.
|
|
Accessors
|
|
|
getVersion cert returns the version number of certificate. It
seems the number is 0-origin: version 2 means X.509 v3.
|
|
|
setVersion cert ver updates the version number of certificate.
|
|
|
getSerialNumber cert returns the serial number of certificate.
|
|
|
setSerialNumber cert num updates the serial number of
certificate.
|
|
|
:: X509 | The certificate to examine.
| -> Bool | True if you want the keys of each parts
to be of long form (e.g. "commonName"),
or False if you don't (e.g. "CN").
| -> IO [(String, String)] | Pairs of key and value,
for example [("C",
"JP"), ("ST",
"Some-State"), ...].
| getIssuerName returns the issuer name of certificate.
|
|
|
|
setIssuerName cert name updates the issuer name of
certificate. Keys of each parts may be of either long form or short
form. See getIssuerName.
|
|
|
getSubjectName cert wantLongName returns the subject name of
certificate. See getIssuerName.
|
|
|
setSubjectName cert name updates the subject name of
certificate. See setIssuerName.
|
|
|
getNotBefore cert returns the time when the certificate begins
to be valid.
|
|
|
setNotBefore cert utc updates the time when the certificate
begins to be valid.
|
|
|
getNotAfter cert returns the time when the certificate
expires.
|
|
|
setNotAfter cert utc updates the time when the certificate
expires.
|
|
|
getPublicKey cert returns the public key of the subject of
certificate.
|
|
|
setPublicKey cert pubkey updates the public key of the subject
of certificate.
|
|
|
getSubjectEmail cert returns every subject email addresses in
the certificate.
|
|
Produced by Haddock version 2.4.2 |