Skip to content

Commit

Permalink
convert aes128-gcm96 keys to milliseconds to work with date-frmo-now …
Browse files Browse the repository at this point in the history
…helper
  • Loading branch information
andaley committed Jul 17, 2020
1 parent 94b5e0e commit f25c3ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/app/serializers/transit-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f25c3ff

Please sign in to comment.