pkcs10-0.2.0.0: PKCS#10 library

LicenseApache-2.0
MaintainerTimothy Klim <hackage@timothyklim.com>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.X509.PKCS10

Contents

Description

Read/Write PKCS10 certificate signing request (also CSR or certification request).

Follows RFC2986

Synopsis

Documentation

newtype Version Source #

Version of CSR (default 0).

Constructors

Version Int 

newtype Signature Source #

Signature of certificate request info.

Constructors

Signature ByteString 

data KeyPair Source #

Key pair for RSA and DSA keys.

makeX520Attributes :: [(X520Attribute, String)] -> X520Attributes Source #

Helper to convert string values as utf8 asn1 strings.

generateCSR :: (MonadRandom m, HashAlgorithmConversion hashAlg, HashAlgorithm hashAlg) => X520Attributes -> PKCS9Attributes -> KeyPair -> hashAlg -> m (Either Error CertificationRequest) Source #

Generate CSR.

toDER :: CertificationRequest -> ByteString Source #

Convert CSR to DER as ByteString.

fromDER :: ByteString -> Either Error SignedCertificationRequest Source #

Convert ByteString to signed CSR.

toPEM :: CertificationRequest -> PEM Source #

Convert CSR to PEM format.

toNewFormatPEM :: CertificationRequest -> PEM Source #

Convert CSR to PEM new format.

fromPEM :: PEM -> Either Error SignedCertificationRequest Source #

Convert PEM to signed CSR.

Orphan instances