MINOR: ssl: add ssl_{c,s}_chain_der fetch methods

Following work from Arjen and Mathilde, it adds ssl_{c,s}_chain_der
methods; it returns DER encoded certs from SSL_get_peer_cert_chain

Also update existing vtc tests to add random intermediate certificates

When getting the result through this header:
  http-response add-header x-ssl-chain-der %[ssl_c_chain_der,hex]
One can parse it with any lib accepting ASN.1 DER data, such as in go:
  bin, err := encoding/hex.DecodeString(cert)
  certs_parsed, err := x509.ParseCertificates(bin)

Cc: Arjen Nienhuis <arjen@zorgdoc.nl>
Signed-off-by: Mathilde Gilles <m.gilles@criteo.com>
Signed-off-by: William Dauchy <w.dauchy@criteo.com>
diff --git a/reg-tests/ssl/ssl_client_samples.vtc b/reg-tests/ssl/ssl_client_samples.vtc
index db5305a..c23d182 100644
--- a/reg-tests/ssl/ssl_client_samples.vtc
+++ b/reg-tests/ssl/ssl_client_samples.vtc
@@ -37,6 +37,7 @@
         ${no-htx} option http-use-htx
 
         http-response add-header x-ssl-der %[ssl_c_der,hex]
+        http-response add-header x-ssl-chain-der %[ssl_c_chain_der,hex]
         http-response add-header x-ssl-sha1 %[ssl_c_sha1,hex]
         http-response add-header x-ssl-notafter %[ssl_c_notafter]
         http-response add-header x-ssl-notbefore %[ssl_c_notbefore]
@@ -58,6 +59,7 @@
     rxresp
     expect resp.status == 200
     expect resp.http.x-ssl-der ~ 3082052D30820315020102300D0.*995ED3BE2BFB923A3EB71FA07002E
+    expect resp.http.x-ssl-chain-der ~ 3082096B30820553A0030201020.*0237D08F425C8414A23D436415502
     expect resp.http.x-ssl-sha1 == "D9C3BAE37EA5A7EDB7B3C9BDD4DCB2FE58A412E4"
     expect resp.http.x-ssl-notafter == "500421185942Z"
     expect resp.http.x-ssl-notbefore == "200428185942Z"