diff options
Diffstat (limited to 'lib/polarssl.c')
-rw-r--r-- | lib/polarssl.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/polarssl.c b/lib/polarssl.c index a2f61d23d..b20b4a397 100644 --- a/lib/polarssl.c +++ b/lib/polarssl.c @@ -212,8 +212,15 @@ polarssl_connect_step1(struct connectdata *conn, infof(data, "PolarSSL re-using session\n"); } +/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's + 1.1.4 version and the like */ +#if POLARSSL_VERSION_NUMBER<0x01020000 ssl_set_session(&connssl->ssl, 1, 600, &connssl->ssn); +#else + ssl_set_session(&connssl->ssl, + &connssl->ssn); +#endif ssl_set_ca_chain(&connssl->ssl, &connssl->cacert, @@ -306,12 +313,25 @@ polarssl_connect_step2(struct connectdata *conn, return CURLE_PEER_FAILED_VERIFICATION; } +/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's + 1.1.4 version and the like */ +#if POLARSSL_VERSION_NUMBER<0x01020000 if(conn->ssl[sockindex].ssl.peer_cert) { +#else + if(ssl_get_peer_cert(&(connssl->ssl))) { +#endif /* If the session was resumed, there will be no peer certs */ memset(buffer, 0, sizeof(buffer)); +/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's + 1.1.4 version and the like */ +#if POLARSSL_VERSION_NUMBER<0x01020000 if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ", conn->ssl[sockindex].ssl.peer_cert) != -1) +#else + if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ", + ssl_get_peer_cert(&(connssl->ssl))) != -1) +#endif infof(data, "Dumping cert info:\n%s\n", buffer); } |