0

I try to understand, how the HTTPS connection works for the SAP-Shine sample. https://github.com/SAP-samples/hana-shine-xsa/blob/master/core-node/server.js

For me it looks so different to the standard express logic, where we create a HTTPS server, like this sample:

var key = fs.readFileSync(__dirname + '/../certs/selfsigned.key');
var cert = fs.readFileSync(__dirname + '/../certs/selfsigned.crt');
var options = {
  key: key,
  cert: cert
};
var server = https.createServer(options, app);

In opposite of this known sample above, SHINE is using the following procedure:

https.globalAgent.options.ca = xsenv.loadCertificates();

The npm xsenv-documentation says, that "this code loads the trusted CA certificates so they are used for all subsequent outgoing HTTPS connections:"

Does it really mean, that we have only after putting the CA certificate to the globalAgent a running outgoing HTTPS connection? Really, if I would know, I would like to check it for myself. But I only found hints for checking https connection for incoming requests, and rather not for outgoing connections.

Sorry, if my question sounds stupid, but I try to understand! Please, let me know if I missed something in the configuration for a properly working outgoing HTTPS connection.

2
  • Hello, I don't understand which is really the question, could you be more specific?
    – cape_bsas
    Dec 22, 2020 at 14:21
  • There are two questions. At first, I would like to know, how are we able to test the outgoing HTTPS connection? Secondly, is it sufficient to pass the CA to the globalAgent to be sure that all outgoing connections are encrypted? Thanks! Dec 23, 2020 at 19:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.