vendredi 19 juin 2015

Is there a way to make the security settings in PDFSharp work in an environment that is restricting to FIPS compliant algorithms?

I am using PDFSharp with a C# MVC3 application to generate a PDF for completing a survey. Everything was working fine until we recently migrated to a Windows Server 2008 environment with the setting "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing" enabled.

Has anyone found a way to continue setting security settings on the PDF while in this type of environment? Here is the security setting block of code that if I remove everything will work:

PdfSecuritySettings securitySettings = pdfDocument.SecuritySettings;
securitySettings.OwnerPassword = "owner";

// Restrict some rights.
securitySettings.PermitAccessibilityExtractContent = false;
securitySettings.PermitAnnotations = false;
securitySettings.PermitAssembleDocument = false;
securitySettings.PermitExtractContent = false;
securitySettings.PermitFormsFill = false;
securitySettings.PermitModifyDocument = false;
securitySettings.PermitPrint = true;
securitySettings.PermitFullQualityPrint = true;

Any thoughts? I was thinking of pulling down the PDFSharp source and seeing if I could use a different algorithm because I believe the issue is with the MD5CryptoServiceProvider.

Aucun commentaire:

Enregistrer un commentaire