openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out certrequest.csr
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
see example-server-secure.js
in https://github.com/eclipse-thingweb/node-wot/tree/master/packages/binding-http#server-example