License | Apache-2.0 |
---|---|
Maintainer | Timothy Klim <hackage@timothyklim.com> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Read/Write PKCS10 certificate signing request (also CSR or certification request).
Follows RFC2986
- data X520Attribute
- = X520CommonName
- | X520SerialNumber
- | X520Name
- | X520Surname
- | X520GivenName
- | X520Initials
- | X520GenerationQualifier
- | X520CountryName
- | X520LocalityName
- | X520StateOrProvinceName
- | X520StreetAddress
- | X520OrganizationName
- | X520OrganizationalUnitName
- | X520Title
- | X520DNQualifier
- | X520Pseudonym
- | X509SubjectAltName
- | EmailAddress
- | IPAddress
- | DomainComponent
- | UserId
- | RawAttribute [Integer]
- newtype X520Attributes = X520Attributes [(X520Attribute, ASN1CharacterString)]
- data PKCS9Attribute = forall e . (Extension e, Show e, Eq e, Typeable e) => PKCS9Attribute e
- newtype PKCS9Attributes = PKCS9Attributes [PKCS9Attribute]
- data CertificationRequestInfo = CertificationRequestInfo {}
- data CertificationRequest = CertificationRequest {}
- data SignedCertificationRequest = SignedCertificationRequest {}
- newtype Version = Version Int
- newtype Signature = Signature ByteString
- data KeyPair
- makeX520Attributes :: [(X520Attribute, String)] -> X520Attributes
- generateCSR :: (MonadRandom m, HashAlgorithmConversion hashAlg, HashAlgorithm hashAlg) => X520Attributes -> PKCS9Attributes -> KeyPair -> hashAlg -> m (Either String CertificationRequest)
- csrToSigned :: CertificationRequest -> SignedCertificationRequest
- verify :: SignedCertificationRequest -> PubKey -> Bool
- toDER :: CertificationRequest -> ByteString
- fromDER :: ByteString -> Either String SignedCertificationRequest
- toPEM :: CertificationRequest -> PEM
- toNewFormatPEM :: CertificationRequest -> PEM
- fromPEM :: PEM -> Either String SignedCertificationRequest
Documentation
data X520Attribute Source
A list of X520 attributes.
newtype X520Attributes Source
X520 attributes.
data PKCS9Attribute Source
A list of PKCS9 extension attributes.
forall e . (Extension e, Show e, Eq e, Typeable e) => PKCS9Attribute e |
newtype PKCS9Attributes Source
PKCS9 extension attributes.
Version of CSR (default 0).
Signature of certificate request info.
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 String CertificationRequest) Source
Generate CSR.
csrToSigned :: CertificationRequest -> SignedCertificationRequest Source
Sign CSR.
verify :: SignedCertificationRequest -> PubKey -> Bool Source
Verify signed CSR.
toDER :: CertificationRequest -> ByteString Source
Convert CSR to DER as ByteString.
fromDER :: ByteString -> Either String 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.