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

data PKCS9Attribute #

A list of PKCS9 extension attributes.

Constructors

(Extension e, Show e, Eq e, Typeable e) => PKCS9Attribute e 

newtype PKCS9Attributes #

PKCS9 extension attributes.

newtype Version #

Version of CSR (default 0).

Constructors

Version Int 
Instances
Eq Version # 
Instance details

Defined in Data.X509.PKCS10

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Show Version # 
Instance details

Defined in Data.X509.PKCS10

ASN1Object Version # 
Instance details

Defined in Data.X509.PKCS10

newtype Signature #

Signature of certificate request info.

Constructors

Signature ByteString 
Instances
Eq Signature # 
Instance details

Defined in Data.X509.PKCS10

Show Signature # 
Instance details

Defined in Data.X509.PKCS10

ASN1Object Signature # 
Instance details

Defined in Data.X509.PKCS10

data KeyPair #

Key pair for RSA and DSA keys.

Instances
Eq KeyPair # 
Instance details

Defined in Data.X509.PKCS10

Methods

(==) :: KeyPair -> KeyPair -> Bool #

(/=) :: KeyPair -> KeyPair -> Bool #

Show KeyPair # 
Instance details

Defined in Data.X509.PKCS10

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

Helper to convert string values as utf8 asn1 strings.

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

Generate CSR.

verify :: SignedCertificationRequest -> PubKey -> Bool #

Verify signed CSR.

toDER :: CertificationRequest -> ByteString #

Convert CSR to DER as ByteString.

fromDER :: ByteString -> Either Error SignedCertificationRequest #

Convert ByteString to signed CSR.

toPEM :: CertificationRequest -> PEM #

Convert CSR to PEM format.

toNewFormatPEM :: CertificationRequest -> PEM #

Convert CSR to PEM new format.

fromPEM :: PEM -> Either Error SignedCertificationRequest #

Convert PEM to signed CSR.

Orphan instances

ASN1Object Signature # 
Instance details