Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- type RSAKeyPair = (PublicKey, PrivateKey)
- type SignedCert = SignedExact Certificate
- toPem :: PEM -> String
- signedCertToString :: SignedCert -> String
- privateKeyToString :: PrivateKey -> String
- publicKeyToString :: PublicKey -> String
- mkKeyPair :: HasCallStack => (Integer, Integer) -> App RSAKeyPair
- primesA :: (Integer, Integer)
- primesB :: (Integer, Integer)
- intermediateCert :: HasCallStack => String -> PublicKey -> String -> PrivateKey -> SignedCert
- selfSignedCert :: HasCallStack => String -> RSAKeyPair -> SignedCert
- signMsgWithPrivateKey :: HasCallStack => PrivateKey -> ByteString -> ByteString
- mkSignedCert :: HasCallStack => PublicKey -> PrivateKey -> String -> String -> SignedExact Certificate
Documentation
type RSAKeyPair = (PublicKey, PrivateKey) Source #
type SignedCert = SignedExact Certificate Source #
signedCertToString :: SignedCert -> String Source #
convert a signed certificate to a string
privateKeyToString :: PrivateKey -> String Source #
convert a private key to string
publicKeyToString :: PublicKey -> String Source #
convert a public key to string
mkKeyPair :: HasCallStack => (Integer, Integer) -> App RSAKeyPair Source #
the minimum key size is hard coded to be 256 bytes (= 2048 bits)
:: HasCallStack | |
=> String | name of the owner of the certificate |
-> PublicKey | the public key of the owner |
-> String | name of the signatory (intermediate/ root CA) |
-> PrivateKey | the private (signature) key of the signing (intermediate/ root) CA |
-> SignedCert |
sign an intermediate leaf certificate by signing with an intermediate root CA's key
:: HasCallStack | |
=> String | name of the owner |
-> RSAKeyPair | key material of the owner |
-> SignedCert |
self sign a certificate
signMsgWithPrivateKey :: HasCallStack => PrivateKey -> ByteString -> ByteString Source #
:: HasCallStack | |
=> PublicKey | public key of the *owner* |
-> PrivateKey | private key of *signatory* |
-> String | name of the issuer |
-> String | name of the owner |
-> SignedExact Certificate |
create a signed certificate