node.jsjks

How to parse a JKS file in Node.js or what is the module?


I want to parse a JKS file and compare that JKS file and the certificate to see if they are the same.

// server.js

fs.rename(jksPath, JKS_PATH, function(err){
  if( err ) throw err;
  console.log("success");
});

const jksFile = fs.readFileSync(JKS_PATH,"utf-8");
console.log(jksFile);

I even read the saved jks, but I don't know how to parse it.


Solution

  • Here are two modules that can be used to parse JKS:

    1. parse-jks
    2. jks-js

    I hope this will be helpful to you.