OptimizeResources MD5CryptoServiceProvider FIPS

We are running the current version of AsposePDF to merge PDF files and then call .OptimizeResources to compact the document. This Windows Server 2016 has FIPS enabled and we receive an Exception stating that MD5CryptoServiceProvider is not supported with FIPS (which we already know). I can see in the forums where you may have addressed this elsewhere but it looks like it is still a problem here.

Is there any sort of work around?

@robbe

Thank you for contacting support.

Please try to add following code in your application’s config file:

<configuration>
    <runtime>
       <enforceFIPSPolicy enabled="false"/>
    </runtime>
</configuration> 

We hope this will be helpful. Please feel free to contact us if you need any further assistance.

On Windows 10, the compression seems to work properly. On Windows Server 2016, the exception is no longer thrown but it doesn’t appear to execute the compression.

@robbe

Thank you for your kind feedback.

Ideally, there should not be any difference based on these environments so please try if clean and build option can make any difference. If you still face it then please share a sample application containing SSCCE code along with source and generated files so that we may try to reproduce and investigate it in our environment.

Here is a note from our developer who believes the compression issue may have something to do with how it handles fonts that are not actually used in the document. I’ve uploaded his code and the files in question. FIPS is enabled on the machine(s) but the flag to ignore FIPS is in the .config file.

Pdfconcatnate.zip

Folder - pdfconcatenate (Source code)
Folder -Test Date (pdf files to merge together)

Cartus Corporation-77-Invoices_Expected_results.pdf 486 kb (old adobe v1_3 merge)

Pdfconcatnate processed:
Cartus Corporation-77-Invoices_Windows_10_Fips_Enabled.pdf, 415 kb (File size is great) Adobe V1_7
Cartus Corporation-77-Invoices_2016_Server_Fips_Enables.pdf - Server 2016 file 1,935 kb and the date fonts are correct. Adobe v1_7

2016 server version has fonts not found in the Win 10 version.

@robbe

We are afraid that your file did not attach fine. Please upload it once again or if the size is greater than 10MB then share it via Google Drive, Dropbox etc so that we may investigate further to help you out.

It was too big. You can download it from here. Let me know when you have so I can delete it.

@robbe

Thank you for sharing requested data.

We have logged an investigation ticket with ID PDFNET-46349 in our issue management system. We will let you know as soon as some significant updates will be available in this regard.