472,353 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Digitally sign PDF files

Hi all

I'm developing an application with some reports and we're looking for
advice. This reports should be openoffice.org .odf files, pdf files,
and perhaps microsoft word files (.doc, .docx?) and must be digitally
signed. Is out there some kind of libraries to ease this tasks?

* Access to the local user certificate store, and read PEM or PKCS12
certificate files.
* Read, parse and validate user certificates
* Sign documents: as a binary stream, within an specific document
(pdf, odt, doc)

I've been googling and found very few documentation about this --
except some examples using jython and ironpython.

Thanks
Aug 11 '08 #1
4 8646
Hi,
I'm developing an application with some reports and we're looking for
advice. This reports should be openoffice.org .odf files, pdf files,
and perhaps microsoft word files (.doc, .docx?) and must be digitally
signed. Is out there some kind of libraries to ease this tasks?
For signing you can use OpenSSL or the more complete M2crypto modules.
But this is only the crypto part of the task.
* Access to the local user certificate store, and read PEM or PKCS12
certificate files.
If the certificate store is just a file, both packages can to this. If
the store is some otehr format or maybe the Windows registry, some
additional functions are required, but should be easy to implement.
* Read, parse and validate user certificates
This can be easily done with both.
* Sign documents: as a binary stream, within an specific document
(pdf, odt, doc)
This is the hardest part of the task, since the signature has to be
embedded into the document.
--
Schönen Gruß - Regards
Hartmut Goebel

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de
Aug 11 '08 #2
On 11 ago, 22:29, Hartmut Goebel <h.goe...@goebel-consult.dewrote:
I'm developing an application with some reports and we're looking for
advice. This reports should be openoffice.org .odf files, pdf files,
and perhaps microsoft word files (.doc, .docx?) and must be digitally
signed. Is out there some kind of libraries to ease this tasks?

For signing you can use OpenSSL or the more complete M2crypto modules.
But this is only the crypto part of the task.
M2Crypto? I didn't know of it... surely I must check it.

It's a very delicate component (security and reliability is a must)
and don't know how openssl works in windows environments.
** Access to the local user certificate store, and read PEM or PKCS12
*certificate files.

If the certificate store is just a file, both packages can to this. If
the store is some otehr format or maybe the Windows registry, some
additional functions are required, but should be easy to implement.
Certificates can be both: PKCS12 (.p12) files and under the windows
certificate store.

The best option could be some kind of thin wrapper around windows
CryotoAPI, so access to hardware tokens and smartcard readers should
be easy because under Linux everything seems tied to Mozilla NSS
libraries.
* Sign documents: as a binary stream, within an specific document
(pdf, odt, doc)

This is the hardest part of the task, since the signature has to be
embedded into the document.
OpenOffice.org uses XML DSIG (libxmlsec, libxml2) as stated here[1]
but I can't find more than this[2] implementation/wrapper of libxmlsec

PDF signing... I can't find something like iText for Python... I've
finded examples like this[3] based on Jython... perhaps I should look
at jython because java 1.6 has full access to Windows CryptoAPI and
full XML-DSIG support[4]

IronPython could also be an interesting option for obvious reasons and
there's and iText port for .NET

Thanks

[1] http://marketing.openoffice.org/oooc...signatures.pdf
[2] http://xmlsig.sourceforge.net/build.html
[3] http://kelpi.com/script/00cd7c
[4] http://java.sun.com/javase/6/docs/te...Signature.html
Aug 11 '08 #3
haxier schrieb:
M2Crypto? I didn't know of it... surely I must check it.

It's a very delicate component (security and reliability is a must)
and don't know how openssl works in windows environments.
M2crypto is available for windows, too. So I would not expect any
problems here.
The best option could be some kind of thin wrapper around windows
CryotoAPI, so access to hardware tokens and smartcard readers should
I'm not a windows guy, so I can't help here.
be easy because under Linux everything seems tied to Mozilla NSS
libraries.
Some is using NSS, some is OpenSSL. I personally use M2crypto, since the
licence fits me better.
OpenOffice.org uses XML DSIG (libxmlsec, libxml2) as stated here[1]
but I can't find more than this[2] implementation/wrapper of libxmlsec
I've not found a usefull specification, too. Digital Signing seams to
become part of ODF 1.2, but I've not found a clear statement on which
files have to be signed nor how.
PDF signing... I can't find something like iText for Python... I've
iText is overkill far what you need. You only want to sign, not generate
PDF files.

--
Schönen Gruß - Regards
Hartmut Goebel

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de
Aug 15 '08 #4
On Mon, 2008-08-11 at 14:13 -0700, haxier wrote:
On 11 ago, 22:29, Hartmut Goebel <h.goe...@goebel-consult.dewrote:
I'm developing an application with some reports and we're looking for
advice. This reports should be openoffice.org .odf files, pdf files,
and perhaps microsoft word files (.doc, .docx?) and must be digitally
signed. Is out there some kind of libraries to ease this tasks?
For signing you can use OpenSSL or the more complete M2crypto modules.
But this is only the crypto part of the task.

M2Crypto? I didn't know of it... surely I must check it.

It's a very delicate component (security and reliability is a must)
and don't know how openssl works in windows environments.
* Access to the local user certificate store, and read PEM or PKCS12
certificate files.
If the certificate store is just a file, both packages can to this. If
the store is some otehr format or maybe the Windows registry, some
additional functions are required, but should be easy to implement.

Certificates can be both: PKCS12 (.p12) files and under the windows
certificate store.

The best option could be some kind of thin wrapper around windows
CryotoAPI, so access to hardware tokens and smartcard readers should
be easy because under Linux everything seems tied to Mozilla NSS
libraries.
* Sign documents: as a binary stream, within an specific document
(pdf, odt, doc)
This is the hardest part of the task, since the signature has to be
embedded into the document.

OpenOffice.org uses XML DSIG (libxmlsec, libxml2) as stated here[1]
but I can't find more than this[2] implementation/wrapper of libxmlsec

PDF signing... I can't find something like iText for Python... I've
finded examples like this[3] based on Jython... perhaps I should look
at jython because java 1.6 has full access to Windows CryptoAPI and
full XML-DSIG support[4]

IronPython could also be an interesting option for obvious reasons and
there's and iText port for .NET

Thanks

[1] http://marketing.openoffice.org/oooc...signatures.pdf
[2] http://xmlsig.sourceforge.net/build.html
[3] http://kelpi.com/script/00cd7c
[4] http://java.sun.com/javase/6/docs/te...Signature.html
--
http://mail.python.org/mailman/listinfo/python-list
A note on libxmlsec, there are also these python bindings available:
http://pyxmlsec.labs.libre-entrepris...ction=examples

--
John Krukoff <jk******@ltgc.com>
Land Title Guarantee Company

Aug 15 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Aaron | last post by:
How and where do I get my application signed so that when downloading from SP2 it will say my app is signed. Thanks, Aaron
1
by: Peter Wyss | last post by:
Hello, Does anyone have any Information, Turtorials, FAQ's or Websites about Digitally signed Office Add-Ins written in C#? Thanks for the...
7
by: kingski | last post by:
Any idea about this ? http://www.developerfusion.co.uk/forums/thread/114379/#114379 "Can any one help me as i am building a shopping cart and it...
0
by: =?Utf-8?B?RGllZ28gTWFyY2V0?= | last post by:
Hi! I've been looking for a way to digitally sign an e-mail with .NET 1.1 and I haven't been able to find any way of doing this except by buying...
4
by: Chris | last post by:
How do we create digitally signed MDE files in Access 2007 ? I tried to follow the procedure I was using in other office versions. 1. I...
1
by: grey | last post by:
i am doing a project about the file transfer, before the transmission, i need to sign the zip file. is there any way to digitally sign the zip file...
2
by: Terry Chapman | last post by:
I have a 2003 Access .mda add-in which I can sign using my Thawte digital certificate. I am now migrating this add-in to Access 2007 and when I...
29
by: Nick | last post by:
I've seen a few frameworks use the following: function $(id) { return document.getElementById(id); } Then to use: $('something').innerHTML =...
1
by: =?Utf-8?B?RW1lcmljIFRoaWJhdWQ=?= | last post by:
If I disable this option on Domain controler Policy : Microsoft Network Server: Digitally sign communications (always): DISABLE.Does it keep same...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.