Hi
If I enable FIPS then I can no longer upload streams to GridFS using the new driver (this worked on the old driver). This simple code shows the issue :
var client = new MongoClient("mongodb://localhost:27017"); var db = client.GetDatabase("Test"); var gridfs = new GridFSBucket(db); const string filename = @"C:\temp\test.txt"; System.IO.File.WriteAllText(filename, "THIS IS A TEST"); try { var file = System.IO.File.Open(filename, FileMode.Open, FileAccess.Read); var id = gridfs.UploadFromStream(filename, file, null); file.Close(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.Message); }
This yields the following error :
{{ This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.}}
I expect this is due to GridFSForwardOnlyUploadStream.cs using IncrementalMD5.
We used to be able to upload with the old driver as we could specify disabling the MD5 check when connecting to GridFS :
var settings = new MongoGridFSSettings { UpdateMD5 = false, VerifyMD5 = false };
Thanks,
Steve H
- duplicates
-
CSHARP-2162 GridFS MD5 digest must be optional
- Closed
- related to
-
CSHARP-2162 GridFS MD5 digest must be optional
- Closed
-
CSHARP-1703 SCRAM-SHA-1 fails on FIPS machines
- Closed