cURL / Mailing Lists / curl-users / Single Mail

curl-users

Cannot get ssl information !!!!

From: 정중 이 <perllee_at_yahoo.co.kr>
Date: Mon, 3 Jan 2011 12:31:46 +0900 (KST)

static CURLcode get_cert_chain(struct connectdata *conn,
                               struct ssl_connect_data *connssl)
{

  STACK_OF(X509) *sk;
  int i;
  char buf[512] <--- buffer is too small

  struct SessionHandle *data = conn->data;
  int numcerts;
  sk = SSL_get_peer_cert_chain(connssl->handle);

..
..
..
    (void)x509_name_oneline(X509_get_subject_name(x), buf, sizeof(buf)); <--
buffer size 512 is too small, cannot get subject information ...
buffer size  change  8192
Get subject information !!!!!

    infof(data, "%2d Subject: %s\n",i,buf);
    push_certinfo(data, i, "Subject", buf);

}

      
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-03