Skip to content
Snippets Groups Projects
Commit 295b905b authored by Gospodin Bodurov's avatar Gospodin Bodurov
Browse files

Merge branch '436-certificate-details-convert-the-dates-to-dd-mm-yyyy' into 'master'

Remove formatting of certificate validity

Closes dashboard#436

See merge request !29
parents f867fe34 54ecfcca
No related branches found
No related tags found
1 merge request!29Remove formatting of certificate validity
export const formatDateNumeric = date =>
date.toLocaleDateString("en-US", {
year: "numeric",
month: "numeric",
day: "numeric"
});
......@@ -2,7 +2,6 @@ import {canTryPincode, failPincodeAttempt, getTimeLeftInLocalStorage, makeid} fr
import {bufferToHexCodes, stringToArrayBuffer} from 'pvutils';
import {fromBER} from 'asn1js';
import {ContentInfo, SignedData} from 'pkijs';
import {formatDateNumeric} from './dateTimeUtilities';
import {algomap, rdnmap} from '../constants/certificates';
const libmime = require('libmime');
......@@ -975,8 +974,8 @@ export const parseCertificates = signatureBase64 => {
);
const issuer = certificate.issuer.typesAndValues;
const subject = certificate.subject.typesAndValues;
const notAfter = formatDateNumeric(certificate.notAfter.value);
const notBefore = formatDateNumeric(certificate.notBefore.value);
const notAfter = certificate.notAfter.value;
const notBefore = certificate.notBefore.value;
let signatureAlgorithm =
algomap[certificate.signatureAlgorithm.algorithmId];
if (typeof signatureAlgorithm === "undefined") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment