From 7b8f0c94f570d39308804524ddb74d1585cbc962 Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Fri, 17 Jul 2020 13:25:39 -0700 Subject: [PATCH] UI/transit add missed algorithms follow up (#9520) * fix NaN error for version history of aes128-gcm96 transit secrets * convert aes128-gcm96 keys to milliseconds to work with date-frmo-now helper --- ui/app/serializers/transit-key.js | 6 +++++- ui/app/templates/partials/transit-form-show.hbs | 1 + 2 files changed, 6 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; } 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|}}