Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HttpListener] [Managed] HttpListenerRequest should throw an InvalidOperationException calling certificate APIs after not finishing BeginGetClientCertificate #21934

Closed
hughbe opened this issue May 24, 2017 · 0 comments
Assignees
Labels
area-System.Net.Http os-linux Linux OS (any supported distro)
Milestone

Comments

@hughbe
Copy link
Contributor

hughbe commented May 24, 2017

[ConditionalFact(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))]
public async Task ClientCertificateError_GetWhileGettingCertificate_ThrowsInvalidOperationException()
{
    await GetRequest("POST", null, null, (_, request) =>
    {
        request.BeginGetClientCertificate(null, null);
        Assert.Throws<InvalidOperationException>(() => request.ClientCertificateError);
        Assert.Throws<InvalidOperationException>(() => request.BeginGetClientCertificate(null, null));
        Assert.Throws<InvalidOperationException>(() => request.GetClientCertificate());
    });
}
@karelz karelz changed the title [managed bug] HttpListenerRequest should throw an InvalidOperationException calling certificate APIs after not finishing BeginGetClientCertificate [HttpListener] [Managed] HttpListenerRequest should throw an InvalidOperationException calling certificate APIs after not finishing BeginGetClientCertificate May 24, 2017
@stephentoub stephentoub self-assigned this May 25, 2017
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http os-linux Linux OS (any supported distro)
Projects
None yet
Development

No branches or pull requests

3 participants