aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-10-06 10:04:00 +0000
committerWerner Koch <[email protected]>2023-10-06 10:15:10 +0000
commit4963f13f8fa914acfc9addd5f4f19ff75d983ef5 (patch)
treeaa43b99071da962f314219009b8e37cb805febc0 /common/util.h
parentsm: Support more HMAC algos in the pkcs#12 parser. (diff)
downloadgnupg-4963f13f8fa914acfc9addd5f4f19ff75d983ef5.tar.gz
gnupg-4963f13f8fa914acfc9addd5f4f19ff75d983ef5.zip
scd:openpgp: Return better error codes for the Reset Code.
* scd/app-openpgp.c (do_change_pin): Use GPG_ERR_BAD_RESET_CODE where appropriate. * common/util.h: Add error codes missing in gpgrt 1.46. * agent/call-pinentry.c (unlock_pinentry): Handle GPG_ERR_BAD_RESET_CODE. (agent_askpin): Ditlo. Also simply condition. (agent_get_passphrase): Ditto. * g10/call-agent.c (status_sc_op_failure): Handle GPG_ERR_BAD_RESET_CODE. * g10/card-util.c (write_sc_op_status): Ditto. * tools/card-call-scd.c (status_sc_op_failure): Ditto.
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 83882caf2..875969187 100644
--- a/common/util.h
+++ b/common/util.h
@@ -39,6 +39,11 @@
* libgpg-error version. Define them here.
* Example: (#if GPG_ERROR_VERSION_NUMBER < 0x011500 // 1.21)
*/
+#if GPG_ERROR_VERSION_NUMBER < 0x012f00 /* 1.47 */
+# define GPG_ERR_BAD_PUK 320
+# define GPG_ERR_NO_RESET_CODE 321
+# define GPG_ERR_BAD_RESET_CODE 322
+#endif
#ifndef EXTERN_UNLESS_MAIN_MODULE
# if !defined (INCLUDED_BY_MAIN_MODULE)