acdkx_net_ssl provides an implementation for
SSLSocket and a client URLConnection for the https
protocol.
The implementation
acdkx_net_ssl uses the
OpenSSL libary for the encryption and the SSL protocol.
To compile
acdkx_net_ssl you need to install the OpenSSL library.
You can download it at
http://www.openssl.org/source/.
On many unix distributions the OpenSLL libraries and headers are already installed.
On windows you probably have to download/compile at your own.
Please refer to the
INSTALL.[our platform]
files included in the
OpenSSL
distribution.
At least following libraries has be compiled:
To compile acdkx_net_ssl (and derived executables) you have to ajust
the global settings in
acdkenv.cmd
for windows platform or
acdk_globals.*
for unix platforms.
Please refer to following environment variables:
- ACDK_OPENSSL_PATH
- ACDK_OPENSSL_INCLUDE
- ACDK_OPENSSL_LIBPATH
- ACDK_OPENSSL_LIBS
For using a IDE (like Visual Studio) it is recommendable to start the IDE with one
of the starter scripts (
f.e. startvstudio6.cmd
) in the ACDK root directory.
Currently ony very basic features are available.
Here the sample to use HTTPSUrlConnection:
acdk::net::RURL url = new acdk::net::URL("https://www.openssl.org");
// get the byte writer from standard output
acdk::io::RWriter rout = ::acdk::lang::System::out->getWriter();
// retrieve a HTTPS connection, get intput, transfer all input to system out.
url->openConnection()->getInputStream()->trans(rout);
|