Results 1 to 4 of 4

Thread: Enctrypted file uploads to a server

  1. #1
    Join Date
    May 2006
    Posts
    58
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Enctrypted file uploads to a server

    I need to implement enctrypted file uploads from my QT application in Windows. The user will select a directory, and everything in that directory will be uploaded to the server. I need to make it smart enough such that if half of the files are uploaded and then an error occurs, on subsequent uploads it will be able to check the server to see what, if any, of the files in the selected directory have already been uploaded.

    From what I can see, QT does not support SFTP at all, and I have been unable to find any GPL libraries that I can link with. So SFTP seems to be out of the question.

    I considered using Qftp and tunneling FTP over SSH, but my users are very non-technical, and I don't know of any way to tunnel FTP over SSH without requiring the user to manually make the SSH connection. I'm not going to be able to push a solution that requires retraining of the users.

    Right now I am leaning toward using HTTP, but the approach I'm considering seems rather cumbersome and I was wondering if there was a better, simpler way to accomplish this goal. I was considering using HTTPS with QHTTP, and doing server-side authentication using PHP for the upload and other pages (my QT app would post username/password to the login page, and would have to keep track of the session cookie for login state). I was considering implementing the functionality for server-side directory creation and checking for the existance of files using a PHP page that I could pass requests to through Post variables, and responded with a simple XML formatted response (Basically like an AJAX thing, except from my QT app instead of a web browser)

    This isn't a QT question per se, but my app is a QT4 app, and there may be an infinitely simpler solution to this problem that is built into QT. Is there any simple way to implement encrypted file uploads using QT? I have a lot of flexibility with what I can put on my (Linux) fileserver.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Enctrypted file uploads to a server

    Quote Originally Posted by hardgeus View Post
    I considered using Qftp and tunneling FTP over SSH, but my users are very non-technical, and I don't know of any way to tunnel FTP over SSH without requiring the user to manually make the SSH connection. I'm not going to be able to push a solution that requires retraining of the users.
    You can use stunnel (http://stunnel.mirt.net/) through QProcess to set up an SSL connection to your server. Your users won't have to touch a thing and you'll have a decent secure connection with only a light dependency.

  3. #3
    Join Date
    May 2006
    Posts
    58
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Enctrypted file uploads to a server

    Quote Originally Posted by wysota View Post
    You can use stunnel (http://stunnel.mirt.net/) through QProcess to set up an SSL connection to your server. Your users won't have to touch a thing and you'll have a decent secure connection with only a light dependency.
    I was looking at that earlier today, but according to the FAQ it won't work with FTP:
    http://www.stunnel.org/faq/troubleshooting.html#ToC18

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Enctrypted file uploads to a server

    This is not entirely true (it would require a special FTP server), but still you don't have to use FTP itself, right? There is a service FTPS which is FTP over SSL but you can also use your custom protocol, HTTP or whatever else you want that uses a single port to communicate.

Similar Threads

  1. How To Extract A File
    By deekayt in forum General Programming
    Replies: 7
    Last Post: 5th December 2006, 18:27
  2. Retrieving modified date of file using QHttp
    By hardgeus in forum Qt Programming
    Replies: 9
    Last Post: 3rd December 2006, 23:20
  3. How a server can write "Hello" to a browser ?
    By probine in forum Qt Programming
    Replies: 2
    Last Post: 1st December 2006, 14:43
  4. QHttp GET File & Password
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 11th June 2006, 13:04
  5. synching client readings to server output
    By OnionRingOfDoom in forum Qt Programming
    Replies: 14
    Last Post: 28th January 2006, 18:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.