I'm trying to digitally sign a document which is uploaded by a user. I want the user to sign that document using his digital signing certificate (DSC).

Should I:

* transfer the file to the user, and have them sign it on their own system, or
* transfer the user's private key to the server, and sign the file there?

Which way is better, or are there any other, better ways to do this?