Esempio n. 1
0
#pragma warning disable IDE0060 // Remove unused parameter -- required to match encoded route
    public async Task <OcspActionResult> Get(string encoded)
#pragma warning restore IDE0060 // Remove unused parameter
    {
        var ocspHttpRequest = await Request.ToOcspHttpRequest();

        var ocspHttpResponse = await _ocspResponder.Respond(ocspHttpRequest, CreateMetadata());

        return(new OcspActionResult(ocspHttpResponse));
    }
    public async Task <OcspHttpResponse> Respond(OcspHttpRequest httpRequest, RequestMetadata metadata)
    {
        _logger.LogInformation(EventIds.Request, "OCSP request {Method} {Uri} from {RemoteIP}, length: {Length}", httpRequest.HttpMethod, httpRequest.RequestUri, metadata.RemoteIP, httpRequest.Content?.Length);
        var response = await _inner.Respond(httpRequest, metadata);

        _logger.LogInformation(EventIds.Response, "OCSP response {Status}, length: {Length}", response.Status, response.Content.Length);
        return(response);
    }