Browse Source

Merge 9fded76846 into 68269d28b4

pull/2579/merge
austinw-fineart 2 days ago
committed by GitHub
parent
commit
de663aae06
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationConfiguration.liquid
  2. 4
      src/OpenIddict.Client/OpenIddictClientBuilder.cs
  3. 4
      src/OpenIddict.Server/OpenIddictServerBuilder.cs
  4. 4
      src/OpenIddict.Validation/OpenIddictValidationBuilder.cs

8
gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationConfiguration.liquid

@ -241,12 +241,12 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
}
// Note: ECDSA algorithms are bound to specific curves and must be treated separately.
else if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
else if (key.KeySize is 256 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
{
registration.SigningCredentials.Add(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256));
}
else if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
else if (key.KeySize is 384 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
{
registration.SigningCredentials.Add(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha384));
}
@ -274,12 +274,12 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
}
// Note: ECDSA algorithms are bound to specific curves and must be treated separately.
else if (settings.{{ setting.property_name }}.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
else if (settings.{{ setting.property_name }}.KeySize is 256 && settings.{{ setting.property_name }}.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
{
registration.SigningCredentials.Add(new SigningCredentials(settings.{{ setting.property_name }}, SecurityAlgorithms.EcdsaSha256));
}
else if (settings.{{ setting.property_name }}.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
else if (settings.{{ setting.property_name }}.KeySize is 384 && settings.{{ setting.property_name }}.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
{
registration.SigningCredentials.Add(new SigningCredentials(settings.{{ setting.property_name }}, SecurityAlgorithms.EcdsaSha384));
}

4
src/OpenIddict.Client/OpenIddictClientBuilder.cs

@ -497,12 +497,12 @@ public sealed class OpenIddictClientBuilder
}
// Note: ECDSA algorithms are bound to specific curves and must be treated separately.
if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
if (key.KeySize is 256 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
{
return AddSigningCredentials(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256));
}
if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
if (key.KeySize is 384 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
{
return AddSigningCredentials(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha384));
}

4
src/OpenIddict.Server/OpenIddictServerBuilder.cs

@ -508,12 +508,12 @@ public sealed class OpenIddictServerBuilder
}
// Note: ECDSA algorithms are bound to specific curves and must be treated separately.
if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
if (key.KeySize is 256 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
{
return AddSigningCredentials(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256));
}
if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
if (key.KeySize is 384 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
{
return AddSigningCredentials(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha384));
}

4
src/OpenIddict.Validation/OpenIddictValidationBuilder.cs

@ -377,12 +377,12 @@ public sealed class OpenIddictValidationBuilder
}
// Note: ECDSA algorithms are bound to specific curves and must be treated separately.
if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
if (key.KeySize is 256 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha256))
{
return AddSigningCredentials(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256));
}
if (key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
if (key.KeySize is 384 && key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384))
{
return AddSigningCredentials(new SigningCredentials(key, SecurityAlgorithms.EcdsaSha384));
}

Loading…
Cancel
Save