Add support for pin-source within PKCS11 URI#309
Merged
mtrojnar merged 1 commit intoOpenSC:masterfrom Oct 4, 2019
Merged
Conversation
According to https://tools.ietf.org/html/rfc7512#page-9: """ 2.4. PKCS OpenSC#11 URI Scheme Query Attribute Semantics An application can always ask for a PIN by any means it decides to. What is more, in order not to limit PKCS OpenSC#11 URI portability, the "pin-source" attribute value format and interpretation is left to be implementation specific. However, the following rules SHOULD be followed in descending order for the value of the "pin-source" attribute: o If the value represents a URI, it SHOULD be treated as an object containing the PIN. Such a URI may be "file:", "https:", another PKCS OpenSC#11 URI, or something else. o If the value contains "|<absolute-command-path>", the implementation SHOULD read the PIN from the output of an application specified with absolute path "<absolute-command- path>". Note that character "|" representing a pipe does not have to be percent-encoded in the query component of a PKCS OpenSC#11 URI. o Interpret the value as needed in an implementation-dependent way. """ This patch is based on: OpenSC#236, but implements only the first clause of RFC, since the second one is considered as dangerous. For example, such functionality is required by FreeIPA (Bind + OpenDNSSEC). Fixes: OpenSC#273 Co-authored-by: Ortigali Bazarov <ortigali.bazarov@gmail.com> Signed-off-by: Stanislav Levin <slev@altlinux.org>
849c116 to
2fb62a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
According to https://tools.ietf.org/html/rfc7512#page-9:
This patch is based on:
#236,
but implements only the first clause of RFC, since the second one
is considered as dangerous.
For example, such functionality is required by FreeIPA
(Bind + OpenDNSSEC).
Fixes: #273
Co-authored-by: Ortigali Bazarov ortigali.bazarov@gmail.com