Sequence of steps to initialize a ssl-session (only client-mode)

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

 



Hi All.

We are just dealing with the client-side, and following are the steps ::

    SSL_library_init();
    OpenSSL_add_ssl_algorithms();
    OpenSSL_add_all_algorithms();
    SSL_load_error_strings();
    ERR_load_crypto_strings();

    solitary_ssl_ctx = SSL_CTX_new(TLSv1_2_client_method());
    if(solitary_ssl_ctx == NULL)
    {

        HANDLE_CATASTROPHIC_INIT_ERROR("SSL-Context")
        resetDevice();
    }

    if(!SSL_CTX_use_certificate_file(solitary_ssl_ctx,
"/home/sensegrow/cert", SSL_FILETYPE_PEM))
    {
        HANDLE_CATASTROPHIC_INIT_ERROR("SSL-Context-Certificate")
        resetDevice();
    }

    if(!SSL_CTX_use_PrivateKey_file(solitary_ssl_ctx,
"/home/sensegrow/key", SSL_FILETYPE_PEM))
    {
        HANDLE_CATASTROPHIC_INIT_ERROR("SSL-Context-Key")
        resetDevice();
    }

    ssl_init_successful = 1;



-- 
Regards,
Ajay


[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