diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2019-07-08 23:15:32 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2019-07-08 23:33:40 +0100 |
commit | 8b1ee3e95010681d98d1b31af98f0ce0832cedd2 (patch) | |
tree | f28c5345cb62351ff17119c28844f804eb179bfa | |
parent | 46ec5eda8de3580592692a4bd7fb3b54e66fc0f2 (diff) |
Fix revocations query and UI
Use `Exec` rather than `Query` to update revoked status
`Query` works with MySQL but `Exec` is needed with sqlite
Test that the key is revoked
Correct column ordering
-rw-r--r-- | server/a_server-packr.go | 2 | ||||
-rw-r--r-- | server/static/js/table.js | 4 | ||||
-rw-r--r-- | server/store/sqldb.go | 5 | ||||
-rw-r--r-- | server/store/store_test.go | 3 |
4 files changed, 9 insertions, 5 deletions
diff --git a/server/a_server-packr.go b/server/a_server-packr.go index 98e70af..819e9c2 100644 --- a/server/a_server-packr.go +++ b/server/a_server-packr.go @@ -10,5 +10,5 @@ func init() { packr.PackJSONBytes("static", "css/normalize.css", "\"H4sIAAAAAAAA/7RZaY/cNtL+rl9RcRDYnlfd0z2Ok7yazQcjxybI4UXsxS5gDCBKLHVzhyIFkurp9mb/+6J46OjRTBxgnXyYtkRWFet46inq8uITUNq0TIr3uK6thcOL9WZ9Bb/DLz++hZ9Fjcoi/A474dZCXw5r4eIyyy4vLjK4gO0a3qADjg3rpYNGKwcNa4U8gdNgmbIri0Y0a1p8tYa/GTygciBevwGHRweWBDL+r946YI1DA9oIVI45oRXUe6Z2mMOdcHvdO+DCskoKtSNxANBbNPBe65bkX2bZ3rUS/p2BN2QVDCkmZlzD5QVsaSnAqrUrMmFFJqyCCQVsN5vP/KqruOoOq1vh/nDlfwaX/IatPuDgkpaZnVDRvkrzk7cvPC1gcx12wg9vf/n5JZ2vk+xEm4US5AKbAcDX/7P/prH7RhuDtYOykrq+LQflSrtgAHJotAGmTtE8lNj66Cn48Tv46vL/139GTsnRMSFtCfQP27ctM6cyCttuLrdbksYUh++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peu2+w92+x1Uh6+AjleFUTIFcVBIPD1yPffd6VE/8Uagsd2DdVmISLZmZCfWh043AbTNMonSO6WKiNxGsmMwxieKr6rnhCuIIFFt6IBo3FjwCwWsf7fu40Lur9TLLMlT8YS4kJ0avi34Ov7WONhh89T29azTKPpaa8Qc0zhImZW2iIQGFa/j5OOg7lz3jW47WkXIgUfFMC+XdjNuML4Vqe42W/rJaBYneujIkVISrBOJPTMrEmRzjw+gZqjNUJP7SG8WtElzMH2Wc91aoXLl5Yq86btW30R5qUXHS9BV6lcP+04/x54F/lymTFru1wp2ezST2wiDw2i6b5M5p9fcFFV0WzOtQb7F2ankuDv/9eWXu4bR5sKai7LUdjCryH/VUNJzrNeylRsEyQGnxH4y+4HjMaOwafwIAAP//cz7h28YFAAA=\"") + packr.PackJSONBytes("static", "js/table.js", "\"H4sIAAAAAAAA/3xU32/aMBB+56+4pg8xKjV03fowlk5ThcYmukoFaZOqCpn4AA9jp7bDD03875MdSNLC9oKI/X13332+u2muUie0AoMvA2EdKjSkCX8aACtmwGBqIYHvw4cfNGPGInFzYalBm2llcYQb1+zusY5NJEICXKf5EpWjLzma7RAlpk4bEp+naNxlQMUVaaL5FpKC/IYRnUthXRSw67mQCCTAqdFrSyWqmZvDLXQKuVDEohwlOnzUa9IJzF0DQFibI/f10VQiMyTc+OLoVJseS+ekNGLJFjjyagjKFogWMGMOGYIleu31hlxCWTTO57q8CiHBX++P71BK0mlSoRSa/uh+AAmgpAvcjgU/Cb46AqcGmUM+Zu4k4d0RATeZMGhPoq+P0JkRKhUZk6cJ748IS7SWzfAk+sMR2uBKL3Bfa7sN3xTHDSxwKzgwxaFKT8uAKUppnzrPNJXMWv9kkMBTFEjRc/cN7votrgpZB9dU3jTDqZgCOaskHh64Hvvm+VU98SehstyBdVuJSbRkZibUx043ArfNMInSOaaLid5EsGIyxySKL6rnhguII1Bs6YFo3FjwCASvfbRv40LvrtbLLMtQ8bu5kJwYvS76OfzWOtpg8NX39K7RKPtYasbv0DhLmJS1iYYEFK7h1/2g71z2iC85WkfKgUTFMy2UdzNuM74Uqu01WvrbahUkeuvKkFARLhKIPzMpE2dyjA+jZ6jOUJH4a28Ut0pwMX+Ucd5boXLl5om96rhV30Z7qEXFSdNX6FUO+w8/x18G/l2mTFrs1gp3ejaT2AuDwGu7bJI7p9W/F1R0XjAvQ73F2qnlOTv89+eVuYfT5sGairLXdjCqyP+qp6LhXK9hLzUKlgFKi/9h9AXH14zGrvE3AAD//0MsPubGBQAA\"") } diff --git a/server/static/js/table.js b/server/static/js/table.js index c1e2fa2..a2c0e20 100644 --- a/server/static/js/table.js +++ b/server/static/js/table.js @@ -17,9 +17,9 @@ function reqListener() { // Index keyid and principals. row.cells[0].classList = ["keyid"]; row.cells[3].classList = ["principals"]; - row.insertCell(5) + row.insertCell(6) if (!el.revoked) { - row.cells[5].innerHTML = '<input style="margin:0;" type="checkbox" value="'+ el.key_id + '" name="cert_id" id="cert_id" />'; + row.cells[6].innerHTML = '<input style="margin:0;" type="checkbox" value="'+ el.key_id + '" name="cert_id" id="cert_id" />'; } tbody.appendChild(row); }); diff --git a/server/store/sqldb.go b/server/store/sqldb.go index de242eb..8ca34a9 100644 --- a/server/store/sqldb.go +++ b/server/store/sqldb.go @@ -145,7 +145,8 @@ func (db *sqlStore) List(includeExpired bool) ([]*CertRecord, error) { // Revoke an issued cert by id. func (db *sqlStore) Revoke(ids []string) error { - if err := db.conn.Ping(); err != nil { + var err error + if err = db.conn.Ping(); err != nil { return errors.Wrap(err, "unable to connect to database") } q, args, err := sqlx.In("UPDATE issued_certs SET revoked = 1 WHERE key_id IN (?)", ids) @@ -153,7 +154,7 @@ func (db *sqlStore) Revoke(ids []string) error { return err } q = db.conn.Rebind(q) - _, err = db.conn.Query(q, args...) + _, err = db.conn.Exec(q, args...) return err } diff --git a/server/store/store_test.go b/server/store/store_test.go index 628c539..90a494e 100644 --- a/server/store/store_test.go +++ b/server/store/store_test.go @@ -93,6 +93,9 @@ func testStore(t *testing.T, db CertStorer) { if err != nil { t.Error(err) } + if len(revoked) != 1 { + t.Errorf("Expected 1 revoked key, got %d", len(revoked)) + } for _, k := range revoked { if k.KeyID != "key" { t.Errorf("Unexpected key: %s", k.KeyID) |