integration-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Testlib.Certs

Synopsis

Documentation

toPem :: PEM -> String Source #

convert a PEM to a string

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)

intermediateCert Source #

Arguments

:: 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

selfSignedCert Source #

Arguments

:: HasCallStack 
=> String

name of the owner

-> RSAKeyPair

key material of the owner

-> SignedCert 

self sign a certificate

mkSignedCert Source #

Arguments

:: 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