title: Failed to use CURL with SSL in communication test
body: <p>We're trying to connect one machine against another using SSL protocol. To perform the tests, we are testing with curl. 
  We have the public key of the target machine (a three-level .cer file), however, when we enter the certificate in the CURL request, an error occurs:</p>
  
  <p>These are the commands used</p>
  
  <pre><code>curl -v --cert ./publica-wilcard-pre.cer  https://xxx.xxx.xxx.xx
  * About to connect() to xxx.xxx.xxx.xx port 443 (#0)
  *   Trying yyy.yyy.yyy.yyy...
  * Connected to xxx.xxx.xxx.xx (yyy.yyy.yyy.yyy) port 443 (#0)
  * Initializing NSS with certpath: sql:/etc/pki/nssdb
  *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  * unable to load client key: -8178 (SEC_ERROR_BAD_KEY)
  * NSS error -8178 (SEC_ERROR_BAD_KEY)
  * Peer's public key is invalid.
  * Closing connection 0
  curl: (58) unable to load client key: -8178 (SEC_ERROR_BAD_KEY)
  </code></pre>
  
  <p>We also tried using -cacert option but happens another error</p>
  
  <pre><code>curl -v --cacert ../publica-wilcard-pre.cer  https://xxx.xxx.xxx.xx
  * About to connect() to xxx.xxx.xxx.xx port 443 (#0)
  *   Trying yyy.yyy.yyy.yyy...
  * Connected to xxx.xxx.xxx.xx () port 443 (#0)
  * Initializing NSS with certpath: sql:/etc/pki/nssdb
  *   CAfile: ./publica-wilcard-pre.cer
    CApath: none
  * Server certificate:
  *       subject: CN=*.xxx.xxx.xxx.xx,OID.2.5.4.97...
  *       start date: Nov 30 15:58:32 2018 GMT
  *       expire date: Nov 30 15:58:32 2020 GMT
  *       common name: *.xxx.xxx.xxx.xx
  *       issuer: OU=AC Componentes Informáticos,O=FNMT-RCM,C=ES
  * NSS error -8049 (SEC_ERROR_UNRECOGNIZED_OID)
  * Unrecognized Object Identifier.
  * Closing connection 0
  curl: (60) Unrecognized Object Identifier.
  More details here: http://curl.haxx.se/docs/sslcerts.html
  
  curl performs SSL certificate verification by default, using a "bundle"
   of Certificate Authority (CA) public keys (CA certs). If the default
   bundle file isn't adequate, you can specify an alternate file
   using the --cacert option.
  If this HTTPS server uses a certificate signed by a CA represented in
   the bundle, the certificate verification probably failed due to a
   problem with the certificate (it might be expired, or the name might
   not match the domain name in the URL).
  If you'd like to turn off curl's verification of the certificate, use
   the -k (or --insecure) option.
  </code></pre>
  
  <p>My communication should be one way, so I assume that I don't need any client private certificate/chain to connect</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks in advance. Regards.</p>