Lines Matching refs:ssl_session
671 static SSL_SESSION* to_SSL_SESSION(JNIEnv* env, jlong ssl_session_address, bool throwIfNull) {
672 SSL_SESSION* ssl_session
673 = reinterpret_cast<SSL_SESSION*>(static_cast<uintptr_t>(ssl_session_address));
674 if ((ssl_session == NULL) && throwIfNull) {
675 JNI_TRACE("ssl_session == null");
676 jniThrowNullPointerException(env, "ssl_session == null");
678 return ssl_session;
6700 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, false);
6701 JNI_TRACE("ssl=%p NativeCrypto_SSL_set_session ssl_session=%p", ssl, ssl_session);
6706 int ret = SSL_set_session(ssl, ssl_session);
7035 SSL_SESSION* ssl_session = SSL_get1_session(ssl);
7036 JNI_TRACE("ssl=%p NativeCrypto_SSL_do_handshake => ssl_session=%p", ssl, ssl_session);
7037 return (jlong) ssl_session;
7667 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true);
7668 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_session_id", ssl_session);
7669 if (ssl_session == NULL) {
7672 jbyteArray result = env->NewByteArray(ssl_session->session_id_length);
7674 jbyte* src = reinterpret_cast<jbyte*>(ssl_session->session_id);
7675 env->SetByteArrayRegion(result, 0, ssl_session->session_id_length, src);
7677 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_session_id => %p session_id_length=%d",
7678 ssl_session, result, ssl_session->session_id_length);
7687 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true);
7688 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_get_time", ssl_session);
7689 if (ssl_session == NULL) {
7693 jlong result = SSL_SESSION_get_time(ssl_session);
7695 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_get_time => %lld", ssl_session, result);
7704 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true);
7705 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_get_version", ssl_session);
7706 if (ssl_session == NULL) {
7709 const char* protocol = SSL_SESSION_get_version(ssl_session);
7710 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_get_version => %s", ssl_session, protocol);
7718 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true);
7719 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_cipher", ssl_session);
7720 if (ssl_session == NULL) {
7723 const SSL_CIPHER* cipher = ssl_session->cipher;
7725 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_cipher => %s", ssl_session, name);
7733 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true);
7734 JNI_TRACE("ssl_session=%p NativeCrypto_SSL_SESSION_free", ssl_session);
7735 if (ssl_session == NULL) {
7738 SSL_SESSION_free(ssl_session);
7748 SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true);
7749 JNI_TRACE("ssl_session=%p NativeCrypto_i2d_SSL_SESSION", ssl_session);
7750 return ASN1ToByteArray<SSL_SESSION, i2d_SSL_SESSION>(env, ssl_session);
7765 SSL_SESSION* ssl_session = d2i_SSL_SESSION(NULL, &ucp, bytes.size());
7767 // Initialize SSL_SESSION cipher field based on cipher_id http://b/7091840
7768 if (ssl_session != NULL) {
7770 uint32_t cipher_id_network_order = htonl(ssl_session->cipher_id);
7772 if (ssl_session->ssl_version >= SSL3_VERSION_MAJOR) {
7777 ssl_session->cipher = SSLv23_method()->get_cipher_by_char(cipher_id_byte_pointer);
7779 ssl_session->cipher_id, cipher_id_network_order,
7781 SSL_CIPHER_get_name(ssl_session->cipher));
7786 JNI_TRACE("NativeCrypto_d2i_SSL_SESSION => %p", ssl_session);
7787 return reinterpret_cast<uintptr_t>(ssl_session);