Encrypting communications in Kibana

Yes. I found that Kibana is able to connect to Elasticsearch with this setup.

GET /_cat/health?v

epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1561077975 00:46:15 elasticsearch yellow 1 1 3 3 0 0 1 0 - 75.0%

Could you give me an example of ealsticsearch-certutil for making a key and a cert file? I tried to do several times. can't make it.

I tried to do like this

$ ./elasticsearch-certutil ca
Please enter the desired output file [elastic-stack-ca.p12]: elastic-stack-ca.p12
Enter password for elastic-stack-ca.p12 :

$ ls /home/phil/elasticsearch-7.1.1/elastic-stack-ca.p12
/home/phil/elasticsearch-7.1.1/elastic-stack-ca.p12

$ ./elasticsearch-certutil cert --ca /home/phil/elasticsearch-7.1.1/elastic-stack-ca.p12
Enter password for CA (/home/phil/elasticsearch-7.1.1/elastic-stack-ca.p12) :
Please enter the desired output file [elastic-certificates.p12]:
Enter password for elastic-certificates.p12 :

$ vi kibana.yml

server.ssl.enabled: true
server.ssl.certificate: /home/phil/elasticsearch-7.1.1/elastic-certificates.p12
server.ssl.key: /home/phil/elasticsearch-7.1.1/elastic-certificates.p12

$ bin/kibana
log [01:13:06.046] [fatal][root] Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
at Object.createSecureContext (_tls_common.js:113:17)
at Server (_tls_wrap.js:870:27)
at new Server (https.js:62:14)
at Object.createServer (https.js:85:10)
at module.exports.internals.Core._createListener (/home/phil/kibana-7.1.1-linux-x86_64/node_modules/hapi/lib/core.js:491:79)
at new module.exports.internals.Core (/home/phil/kibana-7.1.1-linux-x86_64/node_modules/hapi/lib/core.js:112:30)
at new module.exports (/home/phil/kibana-7.1.1-linux-x86_64/node_modules/hapi/lib/server.js:25:18)
at Object.createServer (/home/phil/kibana-7.1.1-linux-x86_64/src/core/server/http/http_tools.js:75:20)
at HttpServer.start (/home/phil/kibana-7.1.1-linux-x86_64/src/core/server/http/http_server.js:40:36)
at HttpService.start (/home/phil/kibana-7.1.1-linux-x86_64/src/core/server/http/http_service.js:46:38)

FATAL Error: error:0906D06C:PEM routines:PEM_read_bio:no start line

$

Thanks in advance.