Fix nullable usage on authenticode (#13791) (#13804)

This commit is contained in:
Marcos Ramos 2020-10-30 22:46:16 +01:00 committed by GitHub
parent 72608fb829
commit fbca9141ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -292,7 +292,7 @@ namespace System.Management.Automation
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods")]
private static Signature GetSignatureFromCatalog(string filename)
{
if (Signature.CatalogApiAvailable.HasValue && !Signature.CatalogApiAvailable.Value)
if (Signature.CatalogApiAvailable.HasValue && !Signature.CatalogApiAvailable.GetValueOrDefault())
{
// Signature.CatalogApiAvailable would be set to false the first time it is detected that
// WTGetSignatureInfo API does not exist on the platform, or if the API is not functional on the target platform.