Skip to content

Commit

Permalink
Added examples on how to call the function
Browse files Browse the repository at this point in the history
  • Loading branch information
ishan-juspay committed Jan 31, 2024
1 parent 0a7ec46 commit 61c5ec3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenSSL/X509/Request.hs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ makeX509FromReq req caCert

return cert

-- Add Extensions to certificate (when Server accepting certs requires it)
-- e.g. :
-- addExtensionToX509 cert1 87 "CA:FALSE"
-- addExtensionToX509 cert1 85 "critical,serverAuth, clientAuth" - when this extension field is critical

addExtensionToX509 :: X509 -> Int -> String -> IO Bool
addExtensionToX509 (Cert.X509 certFPtr) nid value = do
-- Context and config pointers are set to nullPtr for simplicity.
Expand Down

0 comments on commit 61c5ec3

Please sign in to comment.