Search code examples
javascriptnode.jselasticsearchsslcertificate

Connect to Elasticsearch with a .p12 certificate and a password


I want to connect to an Elasticsearch server with Nodejs. As a prerequisite I have received a .p12 certificate and a password but I do not know how to new a client object with this credentials. In the node.js official documentation .pem files are used and there is no password. How can I achieve this with nodejs Elasticsearch library?


Solution

  • I found to options:

    1. converting a .p12 to a .pem file see the details
    2. reading a .p12 file with password see the details