From 043c71e862da29c83f1d38d13e95e8fa668c23f6 Mon Sep 17 00:00:00 2001 From: Angel Garbarino Date: Wed, 12 Aug 2020 08:49:55 -0600 Subject: [PATCH] UI/transit add missed algorithms follow up (#9520) (#9722) * fix NaN error for version history of aes128-gcm96 transit secrets * convert aes128-gcm96 keys to milliseconds to work with date-frmo-now helper Co-authored-by: Noelle Daley --- 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|}}