Signing PDFs and Timestamps (reloaded)
Signing PDFs and Timestamps (reloaded)
Hi,
I'm in a similar position than in the previous topic, with some improvments.
My customer got a SIM Card with a RCS** certificate, and I'm successfully signing the document with it with gdpicturepdf (SigSetCertFromSmartCardBySerialNumber)
Now, I've a timestamp server, which provide me a RFC3161 digital timestamp of the hashed file.
How can I mix theses two using gdpicturepdf ?
Thanks !
I'm in a similar position than in the previous topic, with some improvments.
My customer got a SIM Card with a RCS** certificate, and I'm successfully signing the document with it with gdpicturepdf (SigSetCertFromSmartCardBySerialNumber)
Now, I've a timestamp server, which provide me a RFC3161 digital timestamp of the hashed file.
How can I mix theses two using gdpicturepdf ?
Thanks !
Re: Signing PDFs and Timestamps (reloaded)
Hi rlagrange.
At this time, there is no way to Time Stamp.
Time Stamping in curently on developpement.
I hope to have a working build in one month or less.
Best regards.
Jean-Luc
At this time, there is no way to Time Stamp.
Time Stamping in curently on developpement.
I hope to have a working build in one month or less.
Best regards.
Jean-Luc
Re: Signing PDFs and Timestamps (reloaded)
Hi Jean-Luc,
That's a great news !
Thanks for the follow up, and please alert me when it's ready !
Regards,
Romain Lagrange
That's a great news !
Thanks for the follow up, and please alert me when it's ready !
Regards,
Romain Lagrange
Re: Signing PDFs and Timestamps (reloaded)
Hi,
Regarding the recent release of GdPicture 14, will this feature be available as a "14.1" release, or will it be released in 15 only ?
Thanks.
Regarding the recent release of GdPicture 14, will this feature be available as a "14.1" release, or will it be released in 15 only ?
Thanks.
Re: Signing PDFs and Timestamps (reloaded)
Hi rlagrange.
We have made the functions and we are currently in the beta.
I supposed the 14.1 version will include them, at least vers 14.2
Jean-Luc
We have made the functions and we are currently in the beta.
I supposed the 14.1 version will include them, at least vers 14.2
Jean-Luc
Re: Signing PDFs and Timestamps (reloaded)
Hi Jean-Luc,
Did you have a release date for this feature ?
Thanks,
Romain Lagrange
Did you have a release date for this feature ?
Thanks,
Romain Lagrange
Re: Signing PDFs and Timestamps (reloaded)
Hi,
I'm sorry to insist, by I have a demo scheduled for mid september, and I have to know if this feature could be developed in time (if so, I have to get a working build of gdpicture some time before).
Regards,
Romain Lagrange
I'm sorry to insist, by I have a demo scheduled for mid september, and I have to know if this feature could be developed in time (if so, I have to get a working build of gdpicture some time before).
Regards,
Romain Lagrange
Re: Signing PDFs and Timestamps (reloaded)
Hi
The feature will be avaible in the month(August).
Best regards
Jean-Luc
The feature will be avaible in the month(August).
Best regards
Jean-Luc
Re: Signing PDFs and Timestamps (reloaded)
Hi,
Did you have a more precise release date ?
Is it possible to have a working beta build ?
Thanks.
Did you have a more precise release date ?
Is it possible to have a working beta build ?
Thanks.
Re: Signing PDFs and Timestamps (reloaded)
Yes, the feature should be ready within a couple of weeks. A guy from our team will contact you to obtain a beta asap.
Re: Signing PDFs and Timestamps (reloaded)
Still waiting.
No need to worry anymore, it's too late for implementing it before the scheduled demo.
No need to worry anymore, it's too late for implementing it before the scheduled demo.
Re: Signing PDFs and Timestamps (reloaded)
Hi,
the feature is already implemented (updated and renewed). Here you can find a code snippet based on GdPicture.NET 14:
How to digitally sign or certify PDF documents
https://www.gdpicture.com/guides/gdpicture/web ... ents.html
the feature is already implemented (updated and renewed). Here you can find a code snippet based on GdPicture.NET 14:
How to digitally sign or certify PDF documents
https://www.gdpicture.com/guides/gdpicture/web ... ents.html
Re: Signing PDFs and Timestamps (reloaded)
Thanks.
I have another issue with this version.
I have a feature : "simple protection", wich sign the document with a self generated certificate.
This is just to prevent further modification of the document, and don't authenticate the issuer.
This was working fine in 14.0.22, but no more since 14.0.25. A first chance exception say : The key didn't exist
Stacktrace =
System.Security.Cryptography.CryptographicException : 'La clé n’existe pas.'
mscorlib.dll!System.Security.Cryptography.Utils.GetKeyPairHelper(System.Security.Cryptography.CspAlgorithmType keyType, System.Security.Cryptography.CspParameters parameters, bool randomKeyContainer, int dwKeySize, ref System.Security.Cryptography.SafeProvHandle safeProvHandle, ref System.Security.Cryptography.SafeKeyHandle safeKeyHandle) Inconnu Aucun symbole n'a été chargé.
mscorlib.dll!System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() Inconnu Aucun symbole n'a été chargé.
mscorlib.dll!System.Security.Cryptography.RSACryptoServiceProvider.RSACryptoServiceProvider(int dwKeySize, System.Security.Cryptography.CspParameters parameters, bool useDefaultKeySize) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_ហ.gdpicture_ᜀ(System.Security.Cryptography.RSACryptoServiceProvider A_0) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_ហ.gdpicture_ᜀ(byte[] A_0, Org.BouncyCastle.X509.X509Certificate[] A_1, System.Security.Cryptography.X509Certificates.X509Certificate2 A_2, Org.BouncyCastle.Crypto.AsymmetricKeyParameter A_3, Org.BouncyCastle.Asn1.Asn1EncodableVector A_4, out byte[] A_5, GdPicture14.PdfSignatureMode A_6, GdPicture14.PdfSignatureHash A_7) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_ឡ.gdpicture_ᜀ(gdpicture_ᠹ A_0, GdPicture14.PdfSignatureMode A_1, bool A_2) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_១.gdpicture_ᜀ(string A_0, GdPicture14.PdfSignatureMode A_1, bool A_2) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!GdPicture14.GdPicturePDF.ApplySignature(string OutputFileName, GdPicture14.PdfSignatureMode SignatureMode, bool Linearisation) Inconnu Aucun symbole n'a été chargé.
The certificate source was set using :
status = oGdPicturePdf.SetSignatureCertificateFromP12(new MemoryStream(Properties.Resources.pfxcodesign), "mypassword");
and status was OK.
The generated cert is generated for visual studio strongnaming, so it's not a "signature" cert.
Again, this was working in 14.0.22. Is this change wanted ?
I have another issue with this version.
I have a feature : "simple protection", wich sign the document with a self generated certificate.
This is just to prevent further modification of the document, and don't authenticate the issuer.
This was working fine in 14.0.22, but no more since 14.0.25. A first chance exception say : The key didn't exist
Stacktrace =
System.Security.Cryptography.CryptographicException : 'La clé n’existe pas.'
mscorlib.dll!System.Security.Cryptography.Utils.GetKeyPairHelper(System.Security.Cryptography.CspAlgorithmType keyType, System.Security.Cryptography.CspParameters parameters, bool randomKeyContainer, int dwKeySize, ref System.Security.Cryptography.SafeProvHandle safeProvHandle, ref System.Security.Cryptography.SafeKeyHandle safeKeyHandle) Inconnu Aucun symbole n'a été chargé.
mscorlib.dll!System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() Inconnu Aucun symbole n'a été chargé.
mscorlib.dll!System.Security.Cryptography.RSACryptoServiceProvider.RSACryptoServiceProvider(int dwKeySize, System.Security.Cryptography.CspParameters parameters, bool useDefaultKeySize) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_ហ.gdpicture_ᜀ(System.Security.Cryptography.RSACryptoServiceProvider A_0) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_ហ.gdpicture_ᜀ(byte[] A_0, Org.BouncyCastle.X509.X509Certificate[] A_1, System.Security.Cryptography.X509Certificates.X509Certificate2 A_2, Org.BouncyCastle.Crypto.AsymmetricKeyParameter A_3, Org.BouncyCastle.Asn1.Asn1EncodableVector A_4, out byte[] A_5, GdPicture14.PdfSignatureMode A_6, GdPicture14.PdfSignatureHash A_7) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_ឡ.gdpicture_ᜀ(gdpicture_ᠹ A_0, GdPicture14.PdfSignatureMode A_1, bool A_2) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!gdpicture_១.gdpicture_ᜀ(string A_0, GdPicture14.PdfSignatureMode A_1, bool A_2) Inconnu Aucun symbole n'a été chargé.
GdPicture.NET.14.dll!GdPicture14.GdPicturePDF.ApplySignature(string OutputFileName, GdPicture14.PdfSignatureMode SignatureMode, bool Linearisation) Inconnu Aucun symbole n'a été chargé.
The certificate source was set using :
status = oGdPicturePdf.SetSignatureCertificateFromP12(new MemoryStream(Properties.Resources.pfxcodesign), "mypassword");
and status was OK.
The generated cert is generated for visual studio strongnaming, so it's not a "signature" cert.
Again, this was working in 14.0.22. Is this change wanted ?
Re: Signing PDFs and Timestamps (reloaded)
Solved with the support.
For further readings : my certificate only allow SHA1 signatures.
As SHA256 is now the default algorithm (or maybe there was an automatic detection ?), you should now set the correct signature algorithm using :
oGdPicturePdf.SetSignatureHash(PdfSignatureHash.SHA1);
As I didn't find a way to detect what could work with the current certificate, I ended using a try/change/retry code :
- ApplySignature
- if not OK, SetSignatureHash(PdfSignatureHash.SHA1);
- ApplySignature again
...
Thanks
For further readings : my certificate only allow SHA1 signatures.
As SHA256 is now the default algorithm (or maybe there was an automatic detection ?), you should now set the correct signature algorithm using :
oGdPicturePdf.SetSignatureHash(PdfSignatureHash.SHA1);
As I didn't find a way to detect what could work with the current certificate, I ended using a try/change/retry code :
- ApplySignature
- if not OK, SetSignatureHash(PdfSignatureHash.SHA1);
- ApplySignature again
...
Thanks
Who is online
Users browsing this forum: No registered users and 1 guest