SSL: PEM pass phrase

Dan Morphis dan at milkcarton.com
Wed May 27 03:26:27 EDT 2015


You need to make the changes to the .coffee files. Otherwise when you pull down changes from git  your changes to the .js files will be overwritten when the .coffee files are compiled.

After you do that, submit a pull request so it can be merged.

-dan

> On May 26, 2015, at 10:25 PM, Markus Mehlan <markus.mehlan at argus.info> wrote:
> 
>> Am 26.05.2015 um 14:55 schrieb Markus Mehlan:
>> When I start genieacs with configured SSL, it asks me always for
>> the PEM pass phrase". Where can I store the passphrase?
>> 
>> Regards, Markus
> 
> You have to change following files if you want to use certs with passphrase:
> 
> ----------------------------------------------------------------
> ./lib/config.js
> add new Parameter to options
> 
> CWMP_PASSPHRASE: {
>    type: 'string',
>    "default":''
>  },
> 
> ----------------------------------------------------------------
> ./lib/server.js
> add passphrase to options
> 
> if (useHttps) {
>  path = require('path');
>  fs = require('fs');
>  httpsKey = path.resolve(config.get('CONFIG_DIR'), "" + service + ".key");
>  httpsCert = path.resolve(config.get('CONFIG_DIR'), "" + service + ".crt");
>  options = {
>    key: fs.readFileSync(httpsKey),
>    cert: fs.readFileSync(httpsCert),
>    passphrase: config.get(service.toUpperCase()+'_PASSPHRASE')
>  };
>  server = require('https').createServer(options, listener);
> } else {
>  server = require('http').createServer(listener);
> }
> 
> ----------------------------------------------------------------
> ./config/config.json
> Add parameter CWMP_PASSPHRASE to file
> 
> {
>  ...
>  "CWMP_PORT" : 443,
>  "CWMP_SSL" : true,
>  "CWMP_PASSPHRASE" : "TopSecret",
>  ...
> }
> ----------------------------------------------------------------
> 
> Regards,
> Markus
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users


More information about the Users mailing list