Signing Files/file Objects Using Python And Pyopenssl
I have the following code which works perfectly for signing strings. However, I now need to programatically sign and get a signature for a file in the same way as I would using Ope
Solution 1:
The error states that you are passing an instance of file, when a string or read-only buffer was expected. Try replacing the_file with the_file.read().
Side note: if you are attempting to encrypt and/or sign files, take a look at Cryptographic Message Syntax (CMS) which is supported by ctypescrypto. This article will introduce the SignedData content type, which I think is what you are really after.
Post a Comment for "Signing Files/file Objects Using Python And Pyopenssl"