Note for those who are not aware:  Crypto-C is or was the
marketing name for the fork of SSLeay/OpenSSL offered
commercially by RSA Data Security Inc. after they hired
eay himself to get a crypto library not subject to the
then strict US export limitations (SSLeay was origianally
created entirely outside the US).

The fork of the project between the OpenSSL library
discussed on this list and the Crypto-C library from RSADSI
happened many years ago, and I suspect that only those who
have been with the OpenSSL project since the 1990s would be
able to fully understand the Crypto-C code and its behavior.

Personally, I have never dealt with Crypto-C and have no
idea if and how much it may have tracked OpenSSL
improvements and design changes.


On 2/22/2012 11:29 AM, Nilotpal De wrote:
Hi Everybody,
I have been able to implement HTTPS using Openssl using bio abstraction. Now I am trying the same using RSA-Bsafe's MES library using SA_BIO abstraction. I replaced all BIO calls with SA_BIO calls and it compiles perfectly. On initiating an HTTPS session, my HTTPS Server crashes while doing the handshake in SA_BIO_read(). The client is any standard TLS enabled browser. The Server first accepts a socket on 443 port and I try to use SA_BIO abstraction over it to achieve secure connection.

This is how I am setting up my SSL Server. This function is called when the Server accepts a tcp socket on 443 :

void *NewBIOConnection(int socket, void* SSLcontext)
{
    SA_SSL         *sslSession         = NULL;
    SA_BIO        *socketBio         = NULL;
    SA_BIO        *sslBio             = NULL;

    if ((socket == 0) || (SSLcontext == NULL))
    {
       return NULL;
    }

    if ((sslSession = R_SSL_new((SA_SSL_CTX *)SSLcontext)) == NULL)
        return NULL;

    /* Enable anytime shutdown to handle https requests properly */
    R_SSL_set_options(sslSession, SA_SSL_OP_ANYTIME_SHUTDOWN);

    if ((socketBio = SA_BIO_new_socket(socket, SA_BIO_NOCLOSE)) == NULL)
        return NULL;

    R_SSL_set_bio(sslSession, socketBio, socketBio);

    R_SSL_set_accept_state(sslSession);

    if ((sslBio = SA_BIO_new_ssl((SA_SSL_CTX *)SSLcontext,0)) == NULL)
        return NULL;

if (SA_BIO_ctrl(sslBio,SA_BIO_C_SET_SSL,SA_BIO_NOCLOSE,(char *)sslSession) <= 0)
        return NULL;

    if (sslBio != NULL)
    {
        return ((void *)sslBio);
    }
    else
    {

        return NULL;
    }

}

After this I am reading/writing on SA_BIO returned above.

--
With regards,
Nilotpal



Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to