Skip to content

Commit

Permalink
randomize the cert name
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Aug 1, 2016
1 parent 094a452 commit edd9cfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/models/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"html/template"
"math/rand"
"os"
"os/exec"
"regexp"
Expand Down Expand Up @@ -271,7 +272,7 @@ func (r *Release) Promote() error {
switch app.Parameters[protoParam] {
case "https", "tls":
if app.Parameters[certParam] == "" {
name := fmt.Sprintf("cert-%s-%d", os.Getenv("RACK"), time.Now().Unix())
name := fmt.Sprintf("cert-%s-%d-%05d", os.Getenv("RACK"), time.Now().Unix(), rand.Intn(100000))

body, key, err := GenerateSelfSignedCertificate("*.*.elb.amazonaws.com")
if err != nil {
Expand Down

0 comments on commit edd9cfc

Please sign in to comment.