Skip to content

Conversation

@kuns200
Copy link
Contributor

@kuns200 kuns200 commented Feb 3, 2020

Client certificate mode can now be read from config file.
It uses, connectionreader.cs
Addresses #18660

private IList<EndpointConfig> _endpoints;
private EndpointDefaults _endpointDefaults;

private string _clientCertificateMode;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this type ClientCertificateMode?

}
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove the extra newline above and below property.

}
}

private void ReadClientCertificateMode()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should do the enum parsing instead of LoadClientCertificateMode in KestrelConfigurationLoader.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compare to ParseProtocols

private void ReadClientCertificateMode()
{
_clientCertificateMode = _configuration[ClientCertificateModeKey];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}


private static HttpProtocols? ParseProtocols(string protocols)
private static HttpProtocols? ParseProtocols(string protocols)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this.

{
public class ConfigurationReaderTests
{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

var reader = new ConfigurationReader(config);
var clientCertificateMode = reader.ClientCertificateMode;
Assert.NotNull(clientCertificateMode);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

var reader = new ConfigurationReader(config);
var clientCertificateMode = reader.ClientCertificateMode;
Assert.Null(clientCertificateMode);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

@analogrelay analogrelay added this to the 5.0.0-preview1 milestone Feb 11, 2020
@kuns200
Copy link
Contributor Author

kuns200 commented Feb 12, 2020

ok . will make changes.

@halter73
Copy link
Member

@kuns200 Do you have time to look at this again? Thanks.

@shirhatti
Copy link
Contributor

@kuns200 Are you still interested in doing this?

@BrennanConroy
Copy link
Member

@kuns200 If you're still interested you can open a new PR

@kuns200
Copy link
Contributor Author

kuns200 commented May 5, 2021

I was busy last year with few things at home. Can I look this now? Or is it done?

@ghost
Copy link

ghost commented May 5, 2021

Hi @kuns200. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@BrennanConroy
Copy link
Member

Looks like it got done via #24076

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants