X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Fcomstack.xml;h=ae62b5e939a8e95e3396ed7a3278f170c2f9b485;hp=4c2c6ba5811ac728fadc6c262dcf62755ff51134;hb=f0fff840ae259cab0b1c17297c4367172a7cd229;hpb=d82eeac05d2899fa30704e2c40e9dd603ff2c581 diff --git a/doc/comstack.xml b/doc/comstack.xml index 4c2c6ba..ae62b5e 100644 --- a/doc/comstack.xml +++ b/doc/comstack.xml @@ -1,4 +1,4 @@ - + The COMSTACK Module Synopsis (blocking mode) @@ -60,8 +60,8 @@ if (buf) The &comstack; subsystem provides a transparent interface to different types of transport - stacks for the exchange of BER-encoded data. At present, the - RFC1729 method (BER over TCP/IP), local UNIX socket and an + stacks for the exchange of BER-encoded data and HTTP packets. + At present, the RFC1729 method (BER over TCP/IP), local UNIX socket and an experimental SSL stack are supported, but others may be added in time. The philosophy of the module is to provide a simple interface by hiding unused options and @@ -115,16 +115,17 @@ if (buf) tcpip_type - TCP/IP (BER over TCP/IP) + TCP/IP (BER over TCP/IP or HTTP over TCP/IP) ssl_type Secure Socket Layer (SSL). This COMSTACK - is experimental and is not fully implemented. + is experimental and is not fully implemented. If + HTTP is used, this effectively is HTTPS. unix_type - Unix socket (unix only). Fast local transfer via + Unix socket (unix only). Local Transfer via file socket. See unix 7. @@ -137,7 +138,7 @@ if (buf) The blocking parameter should be one if you wish the association to operate in blocking mode, zero otherwise. The protocol field should be - PROTO_Z3950. + PROTO_Z3950 or PROTO_HTTP. Protocol PROTO_SR is no longer supported. @@ -186,7 +187,8 @@ if (buf) - Receives a PDU from the peer. Returns the number of bytes read. + Receives a PDU or HTTP Response from the peer. Returns the number of + bytes read. In nonblocking mode, it is possible that not all of the packet can be read at once. In this case, the function returns 1. To simplify the interface, the function is @@ -488,6 +490,47 @@ if (buf) + SSL + + + void *cs_get_ssl(COMSTACK cs); + + Returns the SSL handle, SSL * for comstack. If comstack + is not of type SSL, NULL is returned. + + + + + int cs_set_ssl_ctx(COMSTACK cs, void *ctx); + + Sets SSL context for comstack. The parameter is expected to be of type + SSL_CTX *. This function should be called just + after comstack has been created (before connect, bind, etc). + This function returns 1 for success; 0 for failure. + + + + + int cs_set_ssl_certificate_file(COMSTACK cs, const char *fname); + + Sets SSL certificate for comstack as a PEM file. This function + returns 1 for success; 0 for failure. + + + + + + int cs_get_ssl_peer_certificate_x509(COMSTACK cs, char **buf, int *len); + + This function returns the peer certificate. If successful, + *buf and *len holds + X509 buffer and length respectively. Buffer should be freed + with xfree. This function returns 1 for success; + 0 for failure. + + + + Diagnostics @@ -585,18 +628,10 @@ if (buf) - + +