Skip to content

Commit

Permalink
Use long instead of int as the return value of the
Browse files Browse the repository at this point in the history
NativeCrypto.SSL_do_handshake() to fix a crash in 64-bit builds which uses
SSL. (fixes #739)
  • Loading branch information
ntherning committed Feb 4, 2015
1 parent d5238b7 commit b39bfe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -973,7 +973,7 @@ public static native void SSL_set_tlsext_host_name(long sslNativePointer, String
* a server negotiation, supplying the {@code alpnProtocols} will enable
* ALPN negotiation.
*/
public static native int SSL_do_handshake(long sslNativePointer,
public static native long SSL_do_handshake(long sslNativePointer,
FileDescriptor fd,
SSLHandshakeCallbacks shc,
int timeoutMillis,
Expand Down
Expand Up @@ -400,7 +400,7 @@ private void checkOpen() throws SocketException {
}
}

int sslSessionNativePointer;
long sslSessionNativePointer;
try {
sslSessionNativePointer = NativeCrypto.SSL_do_handshake(sslNativePointer,
socket.getFileDescriptor$(), this, getSoTimeout(), client, npnProtocols,
Expand Down

0 comments on commit b39bfe5

Please sign in to comment.