Forum Discussion

ByteBuilderPro's avatar
ByteBuilderPro
Copper Contributor
Nov 30, 2023

Seeking Assistance for InvalidOperationException in Windows Platform FIPS Validation

Hello community,

I'm encountering the following exception while running unit tests:


System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
System.Security.Cryptography.SHA1Managed..ctor()
Microsoft.Cci.UnitHelper.ComputePublicKeyToken(IEnumerable`1 publicKey)
Microsoft.Cci.PeReader.GetAssemblyIdentifier(PEFileReader peFileReader)
Microsoft.Cci.PeReader.OpenModule(IBinaryDocument binaryDocument, ModuleIdentity& moduleIdentity)
Microsoft.Cci.MetadataReader.DefaultWindowsRuntimeHost.LoadUnitFrom(String location)
Microsoft.VisualStudio.TraceCollector.SingleAssemblyHost.ReadAssembly(String assemblyPath)
Microsoft.VisualStudio.TraceCollector.SingleAssemblyHost.LoadAssemblyFrom(String location)
Microsoft.VisualStudio.TraceCollector.FakesAssemblyReflector.GetShimedTypesInfo(String fakeAssemblyFullPath, StringBuilder builder)
Microsoft.VisualStudio.TraceCollector.FakesAssemblyReflector.ReflectShimTypes(String fakesAssembly, String fakedTypesCacheFilePath)
Microsoft.VisualStudio.TraceCollector.FakesAssemblyReflector.ReflectShimTypes(String fakesAssemblyFullPath)
Microsoft.VisualStudio.TraceCollector.UnitTestIsolationDataCollector.PopulateCollectionPlan(_CollectionPlan plan, XmlElement settings)
Microsoft.VisualStudio.TraceCollector.UnitTestIsolationDataCollector.OnFirstCollectorToInitialize(XmlElement configurationElement)
Microsoft.VisualStudio.TraceCollector.CommonDataCollector.OnInitialize(XmlElement configurationElement)
Microsoft.VisualStudio.TraceCollector.BaseDataCollector.InternalConstruct(XmlElement configurationElement, IDataCollectionEvents events, IDataCollectionSink dataSink, IDataCollectionLogger logger, IDataCollectionAgentContext agentContext)
Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectorInformation.InitializeDataCollector()
Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectionManager.LoadAndInitialize(DataCollectorSettings dataCollectorSettings, String settingsXml)



Note: For our security requirements we are enabling the registry
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy, and we cannot disable it.

I know it is related to FIPS validation in the Windows Platform which cause by enabling FipsAlgorithmPolicy.

I would like to know do we have any other alternative to get rid of this exception while running tests.

Any help or insights would be greatly appreciated. Thank you!

Regards,

ByteBuilderPro

  • EricStarker's avatar
    EricStarker
    Icon for Community Manager rankCommunity Manager

    ByteBuilderPro 

    Hello! You've posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Windows 11 space - please post Windows 11 questions here in the future.

     

    (I'm guessing this is the appropriate place based on the content of your post, but let me know if I am incorrect, and if so, what topic it would fit under.) 

     

Resources