pkcs15-crypt - Handle keys with user_consent - Fixes #1292
pkcs15-crypt - Handle keys with user_consent - Fixes #1292

This fixes problem as stated in:
https://github.com/OpenSC/OpenSC/issues/1292#issuecomment-431879472

pkcs15-crypt.c will treat keys with user_consent like PKCS#11 would.
SC_AC_CONTEXT_SPECIFIC is set when doing a verify so a card driver can
take action if needed.

card-piv.c is currently the only driver doing so.
It uses this to hold the card lock so both the VERIFY and following crypto
operations are in the same transaction. The card enforces this restriction.
Without this additional APDUs may be sent before every transaction to test
that the expected applet is selected.

Unlike the circumvention of using ignore_user_consent=true and pin caching
this modification allows a pin pad reader to be used for keys requiring user_consent.

 On branch pkcs15-context-specific
 Changes to be committed:
	modified:   pkcs15-crypt.c

Jakuje/OpenSC,fabled/OpenSC,CardContact/OpenSC,hhonkanen/OpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,rickyepoderi/OpenSC,hhonkanen/OpenSC,LudovicRousseau/OpenSC,mouse07410/OpenSC,mouse07410/OpenSC,fabled/OpenSC,metsma/OpenSC,LudovicRousseau/OpenSC,AktivCo/OpenSC,rickyepoderi/OpenSC,fabled/OpenSC,philipWendland/OpenSC,hongquan/OpenSC-main,metsma/OpenSC,viktorTarasov/OpenSC-SM,philipWendland/OpenSC,OpenSC/OpenSC,dengert/OpenSC,philipWendland/OpenSC,metsma/OpenSC,dengert/OpenSC,viktorTarasov/OpenSC-SM,OpenSC/OpenSC,fabled/OpenSC,frankmorgner/OpenSC,mouse07410/OpenSC,CardContact/OpenSC,rickyepoderi/OpenSC,CardContact/OpenSC,Jakuje/OpenSC,viktorTarasov/OpenSC-SM,OpenSC/OpenSC,frankmorgner/OpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,frankmorgner/OpenSC,LudovicRousseau/OpenSC,dengert/OpenSC,Jakuje/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,hhonkanen/OpenSC