code: function createCsrSubject(opts) {
      const data = {
          C: opts.country,
          ST: opts.state,
          L: opts.locality,
          O: opts.organization,
          OU: opts.organizationUnit,
          CN: opts.commonName || 'localhost',
          emailAddress: opts.emailAddress
      };
  
      return Object.entries(data).map(([key, value]) => {
          value = (value || '').replace(/[^\w .*,@'-]+/g, ' ').trim();
          return value ? `/${key}=${value}` : '';
      }).join('');
  }
docs: Create Certificate Signing Request subject
  
  @private
  @param {object} opts CSR subject options
  @returns {string} CSR subject