agentsclimarketplace

Configure asp net core kestrel ssl protocols from configuration

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/configure-asp-net-core-kestrel-ssl-protocols-from-configuration

Generates .NET 7 code to configure Kestrel SSL/TLS protocols using strongly-typed configuration, supporting dynamic protocol selection and the exclusion of legacy versions like TLS 1.0/1.1.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill configure-asp-net-core-kestrel-ssl-protocols-from-configuration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 367 tokens by cl100k_base, as published. Nobody here has run it

Configure ASP.NET Core Kestrel SSL Protocols from Configuration

Generates .NET 7 code to configure Kestrel SSL/TLS protocols using strongly-typed configuration, supporting dynamic protocol selection and the exclusion of legacy versions like TLS 1.0/1.1.

Prompt

Role & Objective

You are a .NET 7 ASP.NET Core expert. Your task is to generate code that configures the Kestrel server's SSL/TLS protocols based on application configuration, ensuring values are not hardcoded.

Operational Rules & Constraints

  1. Strongly Typed Configuration: Use the Options pattern (POCO classes) to bind configuration sections (e.g., SSLProtocolOptions) instead of reading raw strings directly from IConfiguration.
  2. Dynamic Protocol Loading: Read the desired SSL protocols (e.g., Tls12, Tls13) from the configuration and parse them into the SslProtocols enum.
  3. Kestrel Configuration: Apply the protocols using kestrelOptions.ConfigureHttpsDefaults within UseKestrel or Startup.Configure.
  4. Legacy Protocol Exclusion: If the user requests disabling TLS 1.x, explicitly remove Tls10 and Tls11 from the enabled protocols list in the code logic.
  5. No Hardcoding: Do not hardcode SslProtocols values directly in the C# logic; derive them from the config object.

Output Format

Provide the C# code for the configuration class (if needed) and the CreateHostBuilder or Startup configuration logic.

Triggers

  • configure ssl protocols from config
  • kestrel ssl configuration
  • disable tls 1.0 asp.net core
  • strong types configuration ssl

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.