Encryption/decryption using parameters obtained via handshake (SSL_accept/SSL_connect)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, all :)

I need to link OpenSSL to a library which makes reads/writes itself and
permits only to encrypt data before sending (and decrypt after
receiving). Is it possible to initialize connection as follows

SSL_load_error_strings();
SSL_library_init();
context = SSL_CTX_new(SSLv23_method());
if(!SSL_CTX_use_certificate_file(context, certFile,
SSL_FILETYPE_PEM)) ...
if(SSL_CTX_use_PrivateKey_file(context, keyFile, SSL_FILETYPE_PEM)<0
) ...
ssl = SSL_new(context);
SSL_set_fd(ssl,fd); /// fd is an open socket descriptor
SSL_accept(ssl); // or SSL_connect(ssl); in client

and then use encryption/decryption using parameters obtained by the
initialization stage above?

Thank you in advance, Vladimir

P.S. SSL_read/SSL_write then works well, but as I mentioned, the library
does reads/writes itself...




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux