#!/usr/bin/env node

var gp12 = require('../');
var argv = process.argv;
var p12Path = argv[2];

if (!p12Path) {
  console.error('Please specify a *.p12 file to convert.');
  process.exit(1);
}

gp12(p12Path, function(err, pem) {
  if (err) {
    console.log(err);
    process.exit(1);
  } else {
    console.log(pem);
  }
});
