Thank you, that worked just fine:

int is_dtls(SSL *ssl)
{
        return NULL != BIO_find_type(SSL_get_rbio(ssl), BIO_TYPE_DGRAM);
}

Cheers!

-----
John Lane Schultz
Spread Concepts LLC
Cell: 443 838 2200

On Nov 24, 2014, at 8:04 PM, Dr. Stephen Henson <st...@openssl.org> wrote:

On Mon, Nov 24, 2014, John Lane Schultz wrote:

> Thanks! That will work.
> 
> A system call is pretty heavy weight though, is there a cheaper OpenSSL way 
> of determining the same?
> 

Well getting the version number is one way but you have to check more than one
version if it can use the broken version number of for OpenSSL 1.0.2
(it supports DTLS 1.2 as well).

A similar way to that already suggested is to check the type of BIO used. If
it is a datagram BIO it's DTLS, if socket TLS but that avoids any system
calls.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

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

Reply via email to