How to use the pem.createCSR function in pem

To help you get started, we’ve selected a few pem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / pem / pem-tests.ts View on Github external
'Read edited cert data from CSR': (test: any) => {
    const certInfo = {
      issuer : {},
      country: 'EE',
      state: 'Harjumaa',
      locality: 'Tallinn',
      organization: 'Node.ee',
      organizationUnit: 'test',
      commonName: 'www.node.ee',
      emailAddress: 'andris@node.ee'
    };
    pem.createCSR(Object.create(certInfo), (error: any, data: any) => {
      const csr = (data && data.csr || '').toString();
      test.ifError(error);
      // test.ok(fs.readdirSync('./tmp').length === 0);

      pem.readCertificateInfo(csr, (error: any, data: any) => {
        test.ifError(error);
        test.deepEqual(data, certInfo);
        // test.ok(fs.readdirSync('./tmp').length === 0);
        test.done();
      });
    });
  },
github DefinitelyTyped / DefinitelyTyped / pem / pem-tests.ts View on Github external
'Read edited cert data from CSR': (test: any) => {
    var certInfo = {
      issuer : {},
      country: 'EE',
      state: 'Harjumaa',
      locality: 'Tallinn',
      organization: 'Node.ee',
      organizationUnit: 'test',
      commonName: 'www.node.ee',
      emailAddress: 'andris@node.ee'
    };
    pem.createCSR(Object.create(certInfo), (error: any, data: any) => {
      var csr = (data && data.csr || '').toString();
      test.ifError(error);
      // test.ok(fs.readdirSync('./tmp').length === 0);

      pem.readCertificateInfo(csr, (error: any, data: any) => {
        test.ifError(error);
        test.deepEqual(data, certInfo);
        // test.ok(fs.readdirSync('./tmp').length === 0);
        test.done();
      });
    });
  },
github smartdevicelink / sdl_server / app / v1 / certificates / controller.js View on Github external
tasks.push(function(cb){
            pem.createCSR(csrOptions, function(err, csr){
                cb(err, csr);
            });
        });