sign: skip ssl_util_attrs_to_evp when signing#936
Open
xzz53 wants to merge 1 commit into
Open
Conversation
Starting with this libp11 commit [1] (release 0.4.18), tpm2-pkcs +
opennsl is broken. Any attempt to sign result in the following error:
$ openssl dgst -engine pkcs11 -keyform engine -sign "pkcs11:object=key-label;type=private" -sha256 -out /tmp/example.bin /dev/null
Engine "pkcs11" set.
WARNING:fapi:src/tss2-fapi/api/Fapi_List.c:228:Fapi_List_Finish() Profile of path not provisioned: /HS/SRK
ERROR:fapi:src/tss2-fapi/api/Fapi_List.c:81:Fapi_List() ErrorCode (0x00060034) Entities_List
WARNING: Listing FAPI token objects failed: "fapi:Provisioning was not executed."
Please see https://github.com/tpm2-software/tpm2-pkcs11/blob/1.10.0/docs/FAPI.md for more details
WARNING: Getting tokens from fapi backend failed.
Enter PKCS#11 token PIN for tpm-token:
ERROR: EVP_PKEY_fromdata_init: error:03000096:digital envelope routines::operation not supported for this keytype
Error signing data
This also breaks EAP_TLS auth in wpa_supplicant.
A suggested fix from issue [2] solves this problem. Specifically, we
skip generation of pkey in sign_opdata_new for signing operations,
since it is not actually needed in that case.
[1] OpenSC/libp11@60329e0
[2] tpm2-software#830
Signed-off-by: Mikhail Rudenko <xyzzy@yandex-team.com>
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.
Starting with this libp11 commit [1] (release 0.4.18), tpm2-pkcs + opennsl is broken. Any attempt to sign result in the following error:
This also breaks EAP_TLS auth in wpa_supplicant.
A suggested fix from issue [2] solves this problem. Specifically, we skip generation of pkey in sign_opdata_new for signing operations, since it is not actually needed in that case.
[1] OpenSC/libp11@60329e0
[2] #830