code: function Cert(opts) {
      this.opts = merge({
          type: "pkcs",
          name: uuid.v4()+".ineedatestcert.com",
          org: "Test Cert",
          b: 2048,
          password: '',
          alt: [],
          na: moment().add(1, 'year').toISOString()
      }, opts);
  
      if (typeof(this.opts.alt) === "string") {
          this.opts.alt = [this.opts.alt];
      }
      if (typeof(this.opts.na) !== "string") {
          throw new Error("na should be a datetime string (can be empty)");
      }
      
      this.opts.na = moment(this.opts.na);
      
      if (this.opts.type !== "pkcs" && this.opts.type !== "pem") {
          throw new Error("type needs to be pkcs or pem");
      }
      if (typeof(this.opts.b) !== "number") {
          throw new Error("b needs to be a number");
      }
      if (typeof(this.opts.name) !== "string") {
          throw new Error("name needs to be a string");
      }
      if (typeof(this.opts.org) !== "string") {
          throw new Error("org needs to be a string");
      }
      if (typeof(this.opts.password) !== "string") {
          throw new Error("password should be a string (can be empty)");
      }
      if (!this.opts.alt || typeof(this.opts.alt.length) !== "number") {
          throw new Error("alt should be an array of dns names");
      }
      
      this._wasCrunched = false;
  }
docs: a certificate