From 61c5ec3164d93a210388c6f49dda06febd15eb8d Mon Sep 17 00:00:00 2001 From: Ishan Sharma Date: Wed, 31 Jan 2024 17:29:33 +0530 Subject: [PATCH] Added examples on how to call the function --- OpenSSL/X509/Request.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSSL/X509/Request.hs b/OpenSSL/X509/Request.hs index afcf715..3403cd4 100644 --- a/OpenSSL/X509/Request.hs +++ b/OpenSSL/X509/Request.hs @@ -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.