Commit 86079c5
authored
Improve error handling in admin block-key and revoke-cert (#8647)
Within the admin tool itself, multiple parallel goroutines blocking SPKI
hashes were all writing to the same `err` variable, resulting in a
potential data race. Fix this by giving each goroutine its own local
error.
Within ra.AdministrativelyRevokeCertificate, a failure in the initial
sa.RevokeCertificate call would properly fall back to attempting
sa.UpdateRevokedCertificate, but would not then continue on to calling
sa.AddBlockedKey. Restructure this method to have the same control flow
as ra.RevokeCertByKey, which properly ensures that sa.AddBlockedKey is
called no matter whether the revocation succeeds or fails.1 parent 219190c commit 86079c5
3 files changed
Lines changed: 56 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2030 | 2030 | | |
2031 | 2031 | | |
2032 | 2032 | | |
2033 | | - | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
2034 | 2038 | | |
2035 | 2039 | | |
2036 | 2040 | | |
2037 | 2041 | | |
2038 | 2042 | | |
2039 | 2043 | | |
2040 | | - | |
2041 | | - | |
2042 | | - | |
2043 | | - | |
2044 | | - | |
2045 | | - | |
2046 | | - | |
2047 | | - | |
2048 | | - | |
2049 | 2044 | | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
2050 | 2048 | | |
2051 | 2049 | | |
2052 | 2050 | | |
| |||
2057 | 2055 | | |
2058 | 2056 | | |
2059 | 2057 | | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
2060 | 2070 | | |
2061 | 2071 | | |
2062 | 2072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3956 | 3956 | | |
3957 | 3957 | | |
3958 | 3958 | | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
3959 | 3994 | | |
3960 | 3995 | | |
3961 | 3996 | | |
| |||
0 commit comments