QT QSslError being signaled with the error code set to NoError - qt

My Problem
I compiled OpenSSL into QT to enable OpenSSL support. Everything appeared to go correctly in the compile.
However, when I try to use the official HTTP example application that can be found here, everytime I try to download an https page, it will signal two QSslError, each with contents NoError.
The types of QSslErrors, including NoError, are documented here, poorly. There is no explanation on why they even included an error type called NoError, or what it means.
Bizarrely, the NoError error code seems to be true, as it downloads the remote https document perfectly even while signaling the error.
Does anyone have any idea what this means and what could possibly be causing it?
Optional Background Reading
Here is the relevant part of the code from the example app (this is connected to the network connection's sslErrors signal by the constructor):
void HttpWindow::sslErrors(QNetworkReply*,const QList<QSslError> &errors)
{
QString errorString;
foreach (const QSslError &error, errors) {
if (!errorString.isEmpty())
errorString += ", ";
errorString += error.errorString();
}
if (QMessageBox::warning(this, tr("HTTP"),
tr("One or more SSL errors has occurred: %1").arg(errorString),
QMessageBox::Ignore | QMessageBox::Abort) == QMessageBox::Ignore) {
reply->ignoreSslErrors();
}
}
I have tried the old version of this example, and it produced the same result.
I have tried OpenSSL 1.0.0a and 0.9.8o. I have tried tried compiling OpenSSL myself, I have tried using pre-compiled versions of OpenSSL from the net. All produce the same result.
If this were my first time using QT with SSL, I would almost think this is the intended result (even though their example application is popping up error warning message windows), if not for the fact that last time I played with QT, using what would now be an old version of QT with an old version of SSL, I distinctly remember everything working fine with no error windows.
My system is running Windows 7 x64.

The only path where a QSslError can be constructed with a NoError code is during conversion from OpenSSL error codes to QSslError::SslError values, when the error code is X509_V_OK. There is an interesting note about this error code in the OpenSSL docs:
If no peer certificate was presented, the returned result code is X509_V_OK. This is because no verification error occurred, it does however not indicate success.
Can you check with Wireshark or something similar if the certificate is being transmitted?

I get 4 errors, 3 times over.
The 4 (expected) errors are:
1.The host name did not match any of the valid hosts for this certificate
2.The issuer certificate of a locally looked up certificate could not be found
3.The root CA certificate is not trusted for this purpose
4.No certificates could be verified
I suspect your "NoError" refers to the last (#4)...
The reason I got 3 repeats appears to be because there are 3 threads running - each fires the same sslErrors signal.
I suspect your 2 repeats were due to 2 threads running in the WebView widget.

Related

wine, console program, gtk error messages

From the linux console I run a windows console tool using:
wine console_tool.exe ....
The console tool does not involve any windows. It's output is just textual.
Some output is added repeatedly after a given delay time.
However, besides the output of the console_tool.exe I get repeatedly the following error message also interleaved with the other output:
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I already tried to export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 but then the only change is that the error message changes:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
I also attempted to apt install the :i386 version of the libgtk3-nocsd.so.0 but it doesn't seem to exists.
I don't know why a console application may trigger a gtk error message. This is beyond my knowledge.
My preferred goal would be to tell wine that the .exe does not use windows and it does not need to not use gtk for windows emulation at all. However, as this may not be possible, my second preferred goal would be to solve the gtk issue.
Can you help me achieve at least one of those goals?
I do not know what the error messages mean. However, the wineconsole command runs console executable using wine. Example:
wineconsole console_tool.exe

snmptrapd unknown snmp version 193

I'm trying to capture SNMP traps using snmptrapd but don't seem to be receiving anything.
I installed snmptrapd and then modified the /etc/snmp/snmptrapd.conf file to have authCommunity log public and started the service with systemctl start snmptrapd.
Upon start my syslog has "unknown snmp version 193" printed to it but nothing else and when I send traps it doesn't seem to output anything or throw an error.
Have I missed something?
Couldn't find a reason for "unknown snmp version 193" but it seems you need to specify an output file as it won't do it by default.
My snmptrapd.conf now looks like:
authCommunity log public
[snmp] logOption f /var/log/snmp

JEdit plugin error while loading Isabelle

I am working with a Windows 10 device and after some work with Isabelle I get the following error:
The following plugin could not be loaded:
C:\Users\PC\Desktop\Isabelle2018\src\Tools\jEdit\dist\jars\Isabelle-jEdit.jar:
Cannot start:
*** [line 1 of "preferences"] error: bad input
I note this problem appears in this version and in a previous Windows 8 version when not switching off properly the machine.
In the Isabelle list I got an answer to this problem:
The error indicates that the $ISABELLE_HOME_USER/etc/preferences file is in a bad state: the file is written each time Isabelle/jEdit shuts down, and switching off the computer in the middle might have corrupted it.
You can try to repair or delete that file. The location of $ISABELLE_HOME_USER on Windows is usually something like C:\Users\my_name.isabelle\Isabelle2018.
I think this problem may be encountered by other people in the community and this answer may save some time to them.

Workaround for NoSuchAlgorithmException not working

I'm getting the following exception when I enable SSL debug via -Djavax.net.debug=ssl:
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
I'm running Centos 6.7, Open JDK 1.8.0_91 & Tomcat 7.0.63
My research indicates that this is a known bug: https://bugs.centos.org/view.php?id=9482
I found numerous sources indicating that a workaround for this is to disable the Elliptic Curve cipher algorithms by setting the following property in the jre/lib/security/java.security file:
jdk.tls.disabledAlgorithms=EC,ECDHE,ECDH
I looked at my java.security file and found that these algorithms were already disabled:
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keysize < 768, EC, ECDHE, ECDH
I tried changing this property to be exactly as shown in the examples I found and that did not work either. I also tried removing the jre/lib/ext/sunec.jar file, which again had no effect.
I've carefully traced my installation of Tomcat to ensure that the jre/lib/security/java.security file I'm modifying is the one Tomcat is running on.
If anyone has any ideas about what is going on here or how I can work around this problem I would be very grateful to get your input.
This question is related to OpenJDK on OpenShift: "NoSuchAlgorithmException: EC AlgorithmParameters not available" except I'm not using OpenShift and I am able to edit my java.security file to attempt the well known workaround. My problem is that the workaround does not work for me.

ESP8266 : WPA ENTERPRISE LOGIN WITHOUT CA CERTIFICATE

Thanks a lot for giving your time and reading this,
I have gone though the WPA enterprise question posted in the ESP8266 forum and the related links, but it's not able to help me so I'm starting another topic.
I am trying to connect my ESP to my office network.
To connect through mobile this is usually is the setting:
SSID:PanLAN
EAP methode : PEAP
Phase 2 authentication: None
Ca Certificate: None
Identity: Asia-Pacific\SLAIK
password: Badonkadong
I took the edurom.ino from joostd's github and tried to run it.
https://github.com/genomics-admin/esp8266-eduroam/tree/master/Arduino
I got the following error.
error: 'wifi_station_set_username' was not declared in this scope
wifi_station_set_username(identity, sizeof(identity));
^
ESP8266_PEAPAuth:323: error: 'wifi_station_set_cert_key' was not declared in this scope
if( wifi_station_set_cert_key(testuser_cert_pem, testuser_cert_pem_len, testuser_key_pem, testuser_key_pem_len, NULL, 0) == 0 ) {
^
ESP8266_PEAPAuth:337: error: 'wifi_station_clear_cert_key' was not declared in this scope
wifi_station_clear_cert_key();
^
ESP8266_PEAPAuth:338: error: 'wifi_station_clear_username' was not declared in this scope
wifi_station_clear_username();
^
exit status 1
'wifi_station_set_username' was not declared in this scope.
I'm new to ESP/Arduino however to my eyes it looks like i'm missing the user_interface.h and c_type.h file.
The github account don't have them, so where can I get
them from?
I know user_interface.h is available on github
from other projects, but can I use them?
If yes, then
where shall I put the user_interface.h after downloading?
I found ctype.h in my computer # "C:\Program Files
(x86)\Arduino\hardware\tools\avr\avr\include" is it the same as
c_type.h mentioned in the code? can I rename and use ctype.h?
Is there any other/better example available for me to
follow and get my ESP connected to the network?

Resources