X509 is an opaque object that represents X.509 certificate.
ModuleHsOpenSSL-0.11.7.11Haskell2010
OpenSSL.X509
An interface to X.509 certificate.
Synopsis
- newtype X509
- data X509_
- value newX509
- value wrapX509
- value withX509Ptr
- value withX509Stack
- value unsafeX509ToPtr
- value touchX509
- value writeDerX509
- value readDerX509
- value compareX509
- value signX509
- value verifyX509
- value printX509
- value getVersion
- value setVersion
- value getSerialNumber
- value setSerialNumber
- value getIssuerName
- value setIssuerName
- value getSubjectName
- value setSubjectName
- value getNotBefore
- value setNotBefore
- value getNotAfter
- value setNotAfter
- value getPublicKey
- value setPublicKey
- value getSubjectEmail
- PackageHsOpenSSL-0.11.7.11
- Exports29
- LanguageHaskell2010
- LicenceLicenseRef-PublicDomain
- SourceX509.hsc
Type
Functions to manipulate certificate
writeDerX509 cert writes an X.509 certificate to DER string.
readDerX509 der reads in a certificate.
compareX509 cert1 cert2 compares two certificates.
signX509 signX509 signs a certificate with an issuer private key.
verifyX509 :: PublicKey key=> X509The certificate to be verified.
-> keyThe 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.
getIssuerName 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.