Instead of using basic or digest authentication for an upload, could it be possible for a service to generate a certificate for the client to download for authenticated uploads? Keygen could be used for example, though it might be more straightforward to "Save the certificate" somewhere.
Once the user has the certificate, the user is able to then upload "foobar.png" via cURL. Perhaps like so:
curl -E mycert.pem -F "[email protected]" http://example.com/secure-upload.php
Has anyone setup a similar scheme? I'm not sure it's possible as the -E
switch in the manpage does not mention POST. Also I am unsure how to setup the httpd service to authenticate the certificate. Hopefully just an Apache SSL directive.