File tree Expand file tree Collapse file tree 4 files changed +15
-21
lines changed Expand file tree Collapse file tree 4 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Current Release
21
-
21
+ * Fix the issue that upload Blob and upload File cmdlets fail on FIPS policy enabled machines
22
+ - Set-AzureStorageBlobContent
23
+ - Set-AzureStorageFileContent
24
+
22
25
## Version 4.2.0
23
26
* Support Soft-Delete feature
24
27
- Enable-AzureStorageDeleteRetentionPolicy
Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ public override void ExecuteCmdlet()
501
501
}
502
502
503
503
// if FIPS policy is enabled, must use native MD5
504
- if ( FIPSEnabled )
504
+ if ( fipsEnabled )
505
505
{
506
506
CloudStorageAccount . UseV1MD5 = false ;
507
507
}
Original file line number Diff line number Diff line change @@ -626,28 +626,19 @@ protected override void StopProcessing()
626
626
/// <summary>
627
627
/// true if FIPS policy is enabled on the current machine
628
628
/// </summary>
629
- protected static bool FIPSEnabled
629
+ public static bool fipsEnabled { get ; } = IsFIPSEnabled ( ) ;
630
+
631
+ internal static bool IsFIPSEnabled ( )
630
632
{
631
- get
633
+ try
632
634
{
633
- if ( fIPSEnabled . HasValue )
634
- {
635
- return fIPSEnabled . Value ;
636
- }
637
-
638
- try
639
- {
640
- System . Security . Cryptography . MD5 . Create ( ) ;
641
- }
642
- catch ( System . Reflection . TargetInvocationException )
643
- {
644
- fIPSEnabled = true ;
645
- return true ;
646
- }
647
- fIPSEnabled = false ;
635
+ System . Security . Cryptography . MD5 . Create ( ) ;
648
636
return false ;
649
637
}
638
+ catch ( System . Reflection . TargetInvocationException )
639
+ {
640
+ return true ;
641
+ }
650
642
}
651
- private static bool ? fIPSEnabled = null ;
652
643
}
653
644
}
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public override void ExecuteCmdlet()
81
81
}
82
82
83
83
// if FIPS policy is enabled, must use native MD5
84
- if ( FIPSEnabled )
84
+ if ( fipsEnabled )
85
85
{
86
86
CloudStorageAccount . UseV1MD5 = false ;
87
87
}
You can’t perform that action at this time.
0 commit comments