From 94b5e0e5f1f0a70bcb50a657a8ac6426a63b96ae Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Tue, 14 Jul 2020 16:38:17 -0700 Subject: [PATCH 1/2] fix NaN error for version history of aes128-gcm96 transit secrets --- ui/app/templates/partials/transit-form-show.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app/templates/partials/transit-form-show.hbs b/ui/app/templates/partials/transit-form-show.hbs index 6e6fcf19d9c9..53db8b732253 100644 --- a/ui/app/templates/partials/transit-form-show.hbs +++ b/ui/app/templates/partials/transit-form-show.hbs @@ -103,6 +103,7 @@ {{#if (or (eq key.type "aes256-gcm96") (eq key.type "chacha20-poly1305") + (eq key.type "aes128-gcm96") ) }} {{#each-in key.keys as |version creationTimestamp|}} From f25c3ffaf67bbce4a5f0ba62c595c1427f18ed6b Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Fri, 17 Jul 2020 11:01:14 -0700 Subject: [PATCH 2/2] convert aes128-gcm96 keys to milliseconds to work with date-frmo-now helper --- ui/app/serializers/transit-key.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/app/serializers/transit-key.js b/ui/app/serializers/transit-key.js index e60cd44cf657..2ae35acebdf8 100644 --- a/ui/app/serializers/transit-key.js +++ b/ui/app/serializers/transit-key.js @@ -17,7 +17,11 @@ export default DS.RESTSerializer.extend({ assign(payload, payload.data); delete payload.data; // timestamps for these two are in seconds... - if (payload.type === 'aes256-gcm96' || payload.type === 'chacha20-poly1305') { + if ( + payload.type === 'aes256-gcm96' || + payload.type === 'chacha20-poly1305' || + payload.type === 'aes128-gcm96' + ) { for (let version in payload.keys) { payload.keys[version] = payload.keys[version] * 1000; }