How to ensure security from REST service and Qt application?

  • What is the best way to ensure security in response to a REST and a Qt application? I want that the service reply may not be decoded.

  • Hi,

    I suppose you do http requests from your Qt application (I have made a Qt software that communicate with a php rest api and I use http requests and responses).You must do https requests to have security (the url of the request must be : "https://www.....) and the response will be on https too. and if you are under linux you must allow the tcp port 443 in the iptable rule of your firewall.....(you don't need that in windows) ....

  • PS:if you compile your self Qt and if you use https requests you must link Qt with openssl.

  • @stephane78 Hi and thankyou! But I don't have possibility to use https. I might use some crypt algorithm?

  • https requests and response are encrypted.I don't know how to do otherwise.or perhaps you must encrypt your response from your rest api with openssl or crypt32.lib and decrypt your response in your Qt software.but the more eaysiest way is to use https....

  • sorry, you can encrypt/decrypt strings or files with openssl(on every OS) or advapi32.lib(under windows) if you cannot use https...

  • I don't know if the c# (on the server side) can use these two libraries but the c++ can.with openssl you can encrypt/decrypt strings with aes256 for example(look at stack overflow-google), and the microsoft win32 library advapi32.lib will use the rsa algorithm.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.