title: Openssl : error "self signed certificate in certificate chain"
body: <p>When I used openssl APIs to validate server certificate (self signed), I got following error :</p>
  
  <blockquote>
    <p>error 19 at 1 depth lookup:self signed certificate in certificate
    chain</p>
  </blockquote>
  
  <p>As per openssl <a href="http://www.openssl.org/docs/apps/verify.html" rel="noreferrer">documentation</a>, this error (19) is </p>
  
  <blockquote>
    <p>"X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in
    certificate chain - the certificate chain could be built up using the
    untrusted certificates but the root could not be found locally."</p>
  </blockquote>
  
  <p>Why this error occurs ? Any problems with my server certificate ?</p>