You are reading a single comment by @user111703 and its replies. Click here to read the full conversation.
  • Of course , I delete new line chars, but more easy to fix it source code.

      **const reg= /\r\n/gi;
      pem=pem.replace(reg, '');
      var sr=atob(pem);**

    // var st="";
    // for (var prop in sr){st+=sr.charCodeAt(prop).toString(16)­+',';}
    // console.log(st);

      if(flash.writeFileSync("certificate.cer"­, sr)) {
        console.log('New sertificate data saved...');

Avatar for user111703 @user111703 started