@@ -53,9 +53,12 @@ std::vector<QString> Dtlsthread::getCmdInput(Packet sendpacket, QSettings& setti
5353 cmdComponents.push_back (QString::number (sendpacket.port ));
5454
5555 // get the pathes for verification from the settings
56- cmdComponents.push_back (settings.value (" sslPrivateKeyPath" , " default" ).toString ());
57- cmdComponents.push_back (settings.value (" sslLocalCertificatePath" , " default" ).toString ());
58- QString sslCaPath = settings.value (" sslCaPath" , " default" ).toString ();
56+ QString defaultCertFile = CERTFILE;
57+ QString defaultKeyFile = KEYFILE;
58+ cmdComponents.push_back (settings.value (" sslPrivateKeyPath" , defaultKeyFile).toString ());
59+ cmdComponents.push_back (settings.value (" sslLocalCertificatePath" , defaultCertFile).toString ());
60+ QString sslCaPath = settings.value (" sslCaPath" , " " ).toString ();
61+
5962
6063 // get the full path to to ca-signed-cert.pem file
6164 QDir dir (sslCaPath);
@@ -89,7 +92,7 @@ void Dtlsthread::handShakeComplited(){
8992void Dtlsthread::writeMassage (Packet packetToSend, DtlsAssociation* dtlsAssociation){
9093 const qint64 written = dtlsAssociation->crypto .writeDatagramEncrypted (&(dtlsAssociation->socket ), packetToSend.asciiString ().toLatin1 ());
9194 if (written <= 0 ) {
92- packetToSend.errorString .append (" Failed to send " );
95+ packetToSend.errorString .append (dtlsAssociation-> crypto . dtlsErrorString () );
9396 // if(dtlsAssociation->crypto.isConnectionEncrypted()){
9497 emit packetSent (packetToSend);
9598
0 commit comments