Skip to content

Commit

Permalink
Update certificate revoke command and reasons (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakwerk committed Aug 31, 2024
1 parent cab022a commit 933367d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
4 changes: 2 additions & 2 deletions commander
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ case $txt in
;;
"revoke-cert")
read serial
read reasonCode
read reason
cd /opt/boulder
docker compose exec boulder bin/admin-revoker serial-revoke --config labca/config/admin-revoker.json $serial $reasonCode 2>&1
docker compose exec boulder bin/admin -config labca/config/admin.json revoke-cert -serial $serial -reason $reason -dry-run=false 2>&1
;;
"test-email")
read recipient
Expand Down
8 changes: 2 additions & 6 deletions gui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3043,13 +3043,9 @@ func certRevokeHandler(w http.ResponseWriter, r *http.Request) {
}

serial := r.Form.Get("serial")
reason, err := strconv.Atoi(r.Form.Get("reason"))
if err != nil {
errorHandler(w, r, err, http.StatusBadRequest)
return
}
reason := r.Form.Get("reason")

if !_hostCommand(w, r, "revoke-cert", serial, strconv.Itoa(reason)) {
if !_hostCommand(w, r, "revoke-cert", serial, reason) {
return
}
}
Expand Down
14 changes: 5 additions & 9 deletions gui/templates/views/revoke-partial.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@
Pick a reason for revoking this certificate:<br/>
<select class="form-control" id="revoke-reason">
<option name="" value=""></option>
<option name="Unspecified" value="0">Unspecified</option>
<option name="Key Compromise" value="1">Key Compromise</option>
<option name="CA Compromise" value="2">CA Compromise</option>
<option name="Affiliation Changed" value="3">Affiliation Changed</option>
<option name="Superseded" value="4">Superseded</option>
<option name="Cessation Of Operation" value="5">Cessation Of Operation</option>
<option name="Certificate Hold" value="6">Certificate Hold</option>
<option name="Privilege Withdrawn" value="9">Privilege Withdrawn</option>
<option name="AA Compromise" value="10">AA Compromise</option>
<option name="Unspecified" value="unspecified">Unspecified</option>
<option name="Key Compromise" value="keyCompromise">Key Compromise</option>
<option name="Superseded" value="superseded">Superseded</option>
<option name="Cessation Of Operation" value="cessationOfOperation">Cessation Of Operation</option>
<option name="Privilege Withdrawn" value="privilegeWithdrawn">Privilege Withdrawn</option>
</select><br/>
NOTE that revoking a certificate can NOT be reversed!
</div>
Expand Down

0 comments on commit 933367d

Please sign in to comment.