2 Commits
Author SHA1 Message Date
Michele Balistreri e29070d8a7 bump version 2025-02-06 11:45:04 +01:00
Michele Balistreri 0ff1c525b1 add public file for production 2025-02-06 11:42:25 +01:00
3 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "keycard-certify",
"version": "1.0.0",
"version": "1.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "keycard-certify",
"version": "1.0.0",
"version": "1.1.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "keycard-certify",
"version": "1.0.0",
"version": "1.1.0",
"description": "Keycard Ident Certificate Creation Application",
"main": "./out/app.js",
"scripts": {
+5 -2
View File
@@ -187,6 +187,7 @@ export class Card {
let caKey = BIP32KeyPair.fromTLV(data);
let encKey = fs.readFileSync(gpgKey, { encoding: 'utf8', flag: 'r' });
let encData = "";
let plainData = "";
this.window.send("pub-key", Buffer.from(CryptoUtils.compressPublicKey(caKey.publicKey)).toString('hex'));
@@ -195,8 +196,8 @@ export class Card {
let certData = certificate.toStoreData();
let cardID = lot + '-' + Utils.uint20ToBase32(i);
let certDataString = dataHeader + Buffer.from(certData).toString('hex');
let line = cardID + "," + certDataString + "\n";
encData += line;
encData += cardID + "," + certDataString + "\n";
plainData += cardID + "," + Buffer.from(certificate.identPub).toString('hex') + "\n";
}
let encryptedData = await openpgp.encrypt({
@@ -204,7 +205,9 @@ export class Card {
encryptionKeys: await openpgp.readKey({ armoredKey: encKey }),
});
let plainPath = path.join(path.dirname(destPath), (path.basename(destPath, ".csv.asc") + ".public.csv"));
fs.writeFileSync(destPath, encryptedData);
fs.writeFileSync(plainPath, plainData);
this.window.send("certificate-creation-success");
}