1.1.0 • Published 7 years ago

grunt-cert v1.1.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

grunt-cert

Generates private keys and certificates in a Grunt task.

##Requirements

  • openssl installed
  • grunt installed

##Example Grunt configuration

module.exports = function(grunt) {
    grunt.initConfig({
        cert: {
            keys: {
                mode: {
                    type: 'private-public-keys',
                    keySize: 4096
                },
                locations: {
                    privateKey: './private-key.pem',
                    publicKey: './public-key.pem'
                }
            },
            cert: {
                mode: {
                    type: 'cert',
                    keySize: 4096
                },
                locations: {
                    key: './key.key',
                    cert: './cert.cert'
                },
                certData: {
                    countryName: 'HU',
                    state: 'Csongrad',
                    city: 'Szeged',
                    organizationName: 'FooBar Ltd',
                    organizationUnitName: 'Development',
                    commonName: 'FooBar CA',
                    emailAddress: 'foo@bar.fb'
                }
            }
        }
    });

    grunt.loadNpmTasks('.grunt-cert');
};

Contributors welcome!