X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=4fd940640061e3a7033d4386653835abfe2d0f3e;hb=c7e6e65dc7e8204798a41f6326a9e04632f1f507;hp=d42b23beaebabd431344debec6776b387655a463;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index d42b23b..4fd9406 100644 --- a/client/client.c +++ b/client/client.c @@ -33,15 +33,6 @@ #include #endif -#if HAVE_OPENSSL_SSL_H -#include -#include -#include -#include -#include -#include -#endif - #ifdef WIN32 #include #include @@ -360,21 +351,6 @@ static void send_initRequest(const char* type_and_host) negotiationCharsetRecords); } } - else if (ODR_MASK_GET(req->options, Z_Options_negotiationModel)) - { - Z_OtherInformation **p; - Z_OtherInformationUnit *p0; - - yaz_oi_APDU(apdu, &p); - - if ((p0=yaz_oi_update(p, out, NULL, 0, 0))) - { - p0->which = Z_OtherInfo_externallyDefinedInfo; - p0->information.externallyDefinedInfo = - yaz_set_proposal_charneg(out, 0, 0, 0, 0, 0); - } - - } if (send_apdu(apdu)) printf("Sent initrequest.\n"); } @@ -691,9 +667,6 @@ int session_connect(const char *arg) void *add; char type_and_host[101]; const char *basep = 0; -#if HAVE_OPENSSL_SSL_H - SSL *ssl; -#endif if (conn) { cs_close(conn); @@ -746,30 +719,7 @@ int session_connect(const char *arg) return 0; } printf("OK.\n"); -#if HAVE_OPENSSL_SSL_H - if ((ssl = (SSL *) cs_get_ssl(conn))) - { - X509 *server_cert = SSL_get_peer_certificate (ssl); - - if (server_cert) - { - char *pem_buf; - int pem_len; - BIO *bio = BIO_new(BIO_s_mem()); - - /* get PEM buffer in memory */ - PEM_write_bio_X509(bio, server_cert); - pem_len = BIO_get_mem_data(bio, &pem_buf); - fwrite(pem_buf, pem_len, 1, stdout); - - /* print all info on screen .. */ - X509_print_fp(stdout, server_cert); - BIO_free(bio); - - X509_free (server_cert); - } - } -#endif + cs_print_session_info(conn); if (basep && *basep) set_base (basep); if (protocol == PROTO_Z3950) @@ -4932,7 +4882,6 @@ int main(int argc, char **argv) ODR_MASK_SET(&z3950_options, Z_Options_sort); ODR_MASK_SET(&z3950_options, Z_Options_extendedServices); ODR_MASK_SET(&z3950_options, Z_Options_delSet); - ODR_MASK_SET(&z3950_options, Z_Options_negotiationModel); while ((ret = options("k:c:q:a:b:m:v:p:u:t:Vxd:f:", argv, argc, &arg)) != -2) {