enarmor_file function doesnt close input file

Sebastian superpacko at gmail.com
Wed Apr 27 17:50:35 CEST 2011


Im working on a proyect where we need to tweak some GPG functionality, since
we need to use NSS crypto engine.
Since we want to support armoring, im using the function enarmor_file  from
"dearmor.c".
The things is that after armoring the given file, as the function creates a
new file with the extension ".asc" i want to delete the previous file and
rename the ".asc" to the original name. When i try to remove(file) i get a
permission denied error.
I've made a test, and tried to remove the file before armoring, and it
worked fine, so i guess the armoring function (which is intact, no changes
made) is not closing the file.

here's an ej:

file to armor-> file.dat
armored file that enarmor_file function creates-> file.dat.asc

what i want to do is (after armoring):
remove file.dat  --> i get a permission denied
rename file.dat.asc as file.dat

im using GPG's portable version (1.4)

thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110427/6dde2511/attachment.htm>


More information about the Gnupg-devel mailing list