Re: [iText-questions] .NET and BC signatures

2007-12-12 Thread pchronos

Thanks for the response.

I know and the problem is that PKCS1 signed verifies and PKCS7 signed does
not.
Please see my earlier post for details. 

http://www.nabble.com/pkcs1-to-pkcs7-external-signatures---to13803022.html#a13803022


Thanks in advance for any help you can provide with this issue.





vmeyer wrote:
 
 Hi,
 
 Standard
 GetEncodedPKCS1 = PdfName.ADOBE_PPKLITE  PdfName.ADBE_X509_RSA_SHA1 =
 PdfSignatureAppearance.SELF_SIGNED
 
 Standard
 GetEncodedPKCS7 = PdfName.ADOBE_PPKMS  PdfName.ADBE_PKCS7_SHA1 =
 PdfSignatureAppearance.WINCER_SIGNED 
 
 or 
 
 PdfName.ADOBE_PPKMS, PdfName.ADBE_PKCS7_DETACHED = My :)
 
 Greats
 Volker
 

-- 
View this message in context: 
http://www.nabble.com/.NET-and-BC-signatures-tp14235700p14296039.html
Sent from the iText - General mailing list archive at Nabble.com.


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] .NET and BC signatures

2007-12-12 Thread pchronos

Great to see you resolved your issue !
I will try your solution but I would prefer not to use detached signatues.

Thanks again




vmeyer wrote:
 
 sap.SetCrypto(null, chain, null, PdfSignatureAppearance.WINCER_SIGNED); 
 AND
 byte[] tSsig = tSigner.GetEncodedPKCS7(); 
 
 Is OK, the Problem is WINCER_SIGNED Create a Standard PPKMS With 
 PdfName.ADOBE_PPKMS, PdfName.ADBE_PKCS7_SHA1
 
 I Have solven the Problem By Replaye The Public Class PPKMS in
 PdfSigGenericPKCS.cs ;)
 
 /**
* Creates a standard filter of the type Windows Certificate.
 */
 public class PPKMS : PdfSigGenericPKCS {
 /**
* The constructor for the default provider.
 */
 public PPKMS()
 : base(PdfName.ADOBE_PPKMS,PdfName.ADBE_PKCS7_DETACHED)
 {
 hashAlgorithm = SHA1;
 }
 
 }
 
 Geats
 Volker
 

-- 
View this message in context: 
http://www.nabble.com/.NET-and-BC-signatures-tp14235700p14296514.html
Sent from the iText - General mailing list archive at Nabble.com.


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] .NET and BC signatures

2007-12-12 Thread vmeyer

Hi,

Standard
GetEncodedPKCS1 = PdfName.ADOBE_PPKLITE  PdfName.ADBE_X509_RSA_SHA1 =
PdfSignatureAppearance.SELF_SIGNED

Standard
GetEncodedPKCS7 = PdfName.ADOBE_PPKMS  PdfName.ADBE_PKCS7_SHA1 =
PdfSignatureAppearance.WINCER_SIGNED 

or 

PdfName.ADOBE_PPKMS, PdfName.ADBE_PKCS7_DETACHED = My :)

Greats
Volker
-- 
View this message in context: 
http://www.nabble.com/.NET-and-BC-signatures-tp14235700p14294356.html
Sent from the iText - General mailing list archive at Nabble.com.


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] .NET and BC signatures

2007-12-12 Thread vmeyer

sap.SetCrypto(null, chain, null, PdfSignatureAppearance.WINCER_SIGNED); 
AND
byte[] tSsig = tSigner.GetEncodedPKCS7(); 

Is OK, the Problem is WINCER_SIGNED Create a Standard PPKMS With 
PdfName.ADOBE_PPKMS, PdfName.ADBE_PKCS7_SHA1

I Have solven the Problem By Replaye The Public Class PPKMS in
PdfSigGenericPKCS.cs ;)

/**
   * Creates a standard filter of the type Windows Certificate.
*/
public class PPKMS : PdfSigGenericPKCS {
/**
   * The constructor for the default provider.
*/
public PPKMS()
: base(PdfName.ADOBE_PPKMS, PdfName.ADBE_PKCS7_DETACHED)
{
hashAlgorithm = SHA1;
}

}

Geats
Volker
-- 
View this message in context: 
http://www.nabble.com/.NET-and-BC-signatures-tp14235700p14296470.html
Sent from the iText - General mailing list archive at Nabble.com.
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] .NET and BC signatures

2007-12-08 Thread pchronos


I have a strange problem signing PDF's using iTextSharp with external
signatures. With PKCS1 (SELF_SIGNED) pdfs, Adobe Reader 8 verifies
signatures done with .NET ( RSACryproServiceProvider class with Sha1 ) OK
but fails to verify BC (RsaDigestSigner with Sha1Digest) signed pdfs. With
PKCS7 (WINCER_SIGNED) the reverse is true. BC signed PDFs verify OK but the
.NET ones fail to verify!

Same code is used in both cases except for the required changes to pdf
signature type and PdfPKCS7.GetEncodedPKCSn call ( 1 or 7 )  

Any ideas would be greatly appreciated. 
Thanks in advance.

-- 
View this message in context: 
http://www.nabble.com/.NET-and-BC-signatures-tp14235700p14235700.html
Sent from the iText - General mailing list archive at Nabble.com.


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/