OCSP: fixed invalid type for the 'ssl_ocsp' directive. #938
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
The directive 'ssl_ocsp' accepts 3 options and is defined as an enum, but the type is set to NGX_CONF_FLAG.
This is not a functionality issue but a semantics problem. nginx -t -c validates the config file successfully even without the fix.
However, this issue affects external tools that validate configuration files, including the Nginx Agent.
A few months ago, Crossplane adopted an approach where Nginx source code is scanned to collect a dictionary of valid directives, and their valid contexts and parameters are inferred from the masks used. Since ssl_oscp is marked as a flag parameter in the source code, Crossplane applies that same validation (and therefore anything using Crossplane, like the Agent or NIM, will do the same).
Even though the configuration looks fine from Nginx point of vew, Nginx Agent may report error like:
error reading config from /etc/nginx/nginx.conf, error: invalid value "leaf" in "ssl_ocsp" directive, it must be "on" or "off"Resolves: #937