Fix SSL_shutdown error reporting to print a proper error instead of "Ok"
There are other problematic error reporting cases to be fixed later, but this one seems to be the frequently occuring.
Change-Id: Ia5910cffb60cc694066be03d43ac1bb7eab47357
diff --git a/libcore/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp b/libcore/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
index b822b62..5191fdc 100644
--- a/libcore/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
+++ b/libcore/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
@@ -2052,7 +2052,8 @@
* let the Java layer know about this by throwing an
* exception.
*/
- throwIOExceptionWithSslErrors(env, ret, 0, "SSL shutdown failed.");
+ int sslErrorCode = SSL_get_error(ssl, ret);
+ throwIOExceptionWithSslErrors(env, ret, sslErrorCode, "SSL shutdown failed");
break;
}