Код: Выделить всё
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
String connectionURL = "jdbc:jtds:sqlserver://" + this.server_ip + ":" + this.server_port + ";"
+ "databaseName=" + this.db_name + ";"
+ "integratedSecurity=true;"
+ "ssl=require;"
+ "trustServerCertificate=true";
String eMsg = "";
try {
Class.forName("net.sourceforge.jtds.jdbc.Driver");
DriverManager.setLoginTimeout(10);
this.conn = DriverManager.getConnection( connectionURL, this.user_name, this.pass_word );
} catch (SQLTimeoutException ev){
eMsg = ev.getMessage();
this.sError = "Time out".concat( eMsg == null ?"":": ".concat( eMsg) );
}
catch(SQLServerException e3){
eMsg = e3.getMessage();
this.sError = "Error SQLServerException".concat( eMsg == null ?"":": ".concat( eMsg) );
}
catch(SQLException e) {
eMsg = e.getMessage();
this.sError = "Error SQLException".concat( eMsg == null ?"":": ".concat( eMsg) );
}
catch(ClassNotFoundException e2) {
eMsg = e2.getMessage();
this.sError = "Error ClassNotFoundException".concat( eMsg == null ?"":": ".concat( eMsg) );
}
, когда подключиться к SQL 2008, С помощью SSL он не работает < /strong>, я получаю сообщение об ошибке: < /p>
Ошибка сети ioexception: ошибка чтения: ssl = 0xb400007ad3d1c318: сбой
В библиотеке SSL обычно ошибка ошибки протокола: 100000F0: ssl
Процессы: openssl_internal: unsupported_protocol
(External/boringssl/src/ssl/handshake_client.cc:714
0x7A2AA08D53: 0x0000000000000000) p>
< /blockquote>
Подробнее здесь: https://stackoverflow.com/questions/794 ... 8-with-ssl
Мобильная версия