Skip to content

Commit

Permalink
Merge pull request #80 from sdslabs/internal-error
Browse files Browse the repository at this point in the history
500 internal error resolved
  • Loading branch information
ashpect authored May 17, 2024
2 parents 4a7522a + bad4dde commit 0fa1c76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/utils/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func GenerateCerts(domain string, basePath string) error {
}

// using -traditional flag to get PKCS#1 [different header], otherwise 500 Internal Error
cmd = "openssl rsa -in " + basePath + "/ca.key -out " + basePath + "/ca.key -traditional"
cmd = "openssl rsa -in "+basePath+"/ca.key -out "+basePath+"/ca.key -traditional"
if err := RunCommand(cmd); err != nil {
return err
}
Expand All @@ -54,6 +54,12 @@ func GenerateCerts(domain string, basePath string) error {
return err
}

// using -traditional flag to get PKCS#1 [different header], otherwise 500 Internal Error
cmd="openssl rsa -in "+basePath+"/"+domain+".key -out "+basePath+"/"+domain+".key -traditional"
if err := RunCommand(cmd); err != nil {
return err
}

// Generate certificate signing request
cmd = "openssl req -sha512 -new -subj '/C=IN/ST=Delhi/L=Delhi/O=Katana/CN=" + domain + "' -key " + basePath + "/" + domain + ".key -out " + basePath + "/" + domain + ".csr"
if err := RunCommand(cmd); err != nil {
Expand Down

0 comments on commit 0fa1c76

Please sign in to comment.