diff options
Diffstat (limited to 'acme.hs')
-rw-r--r-- | acme.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -109,7 +109,7 @@ genKey privKeyFile = withOpenSSL $ do | |||
109 | pem <- writePKCS8PrivateKey kp Nothing | 109 | pem <- writePKCS8PrivateKey kp Nothing |
110 | writeFile privKeyFile pem | 110 | writeFile privKeyFile pem |
111 | 111 | ||
112 | genReq :: FilePath -> String -> IO String | 112 | genReq :: FilePath -> String -> IO LC.ByteString |
113 | genReq domainKeyFile domain = withOpenSSL $ do | 113 | genReq domainKeyFile domain = withOpenSSL $ do |
114 | Just (Keys priv pub) <- readKeyFile domainKeyFile | 114 | Just (Keys priv pub) <- readKeyFile domainKeyFile |
115 | Just dig <- getDigestByName "SHA256" | 115 | Just dig <- getDigestByName "SHA256" |
@@ -146,7 +146,7 @@ go CmdOpts{..} = do | |||
146 | 146 | ||
147 | Just keys <- readKeyFile privKeyFile | 147 | Just keys <- readKeyFile privKeyFile |
148 | 148 | ||
149 | doesFileExist domainCSRFile `otherwiseM` genReq domainKeyFile optDomain >>= writeFile domainCSRFile | 149 | doesFileExist domainCSRFile `otherwiseM` genReq domainKeyFile optDomain >>= LC.writeFile domainCSRFile |
150 | 150 | ||
151 | csrData <- B.readFile domainCSRFile | 151 | csrData <- B.readFile domainCSRFile |
152 | 152 | ||