Skip to content

Commit

Permalink
adapt openssl command
Browse files Browse the repository at this point in the history
  • Loading branch information
ariary committed Mar 22, 2023
1 parent f1a0abf commit 1d7a608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wrap/src/wrap.nim
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ proc Wrap(
styledEcho(fgGreen,"[+] ",fgDefault,"Generate certificates 📜")
removeFile("server.key")
removeFile("server.crt")
let errOpenssl = execCmdEx("yes \"\" | openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 30 -out server.crt").exitCode
let errOpenssl = execCmdEx("yes \"\" | openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 30 -out server.crt -subj \"/\"").exitCode
if errOpenssl != 0:
styledEcho(fgRed,"failed creating certificates with openssl")
quit(QuitFailure)
Expand Down Expand Up @@ -219,7 +219,7 @@ proc Wrap(
gitarCmd = fmt"gitar -e {lhost} -p {webport} --secret {secret}"
url = fmt"http:https://{lhost}:{webport}/{secret}"
else:
gitarCmd = fmt"gitar -a https:https://{tunnelEndpoint} -f {lport} --secret {secret}"
gitarCmd = fmt"gitar -a http:https://{tunnelEndpoint} -f {lport} --secret {secret}"
url = fmt"http:https://{tunnelEndpoint}/{secret}"
discard execCmd(fmt"tmux split-window -h '{gitarCmd}'")
# TODO: handle gitar shortcut (only possible without tunneling)
Expand Down

0 comments on commit 1d7a608

Please sign in to comment.