aboutsummaryrefslogtreecommitdiffstats
path: root/g10/card-util.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-05 00:24:40 +0000
committerNIIBE Yutaka <[email protected]>2023-07-05 00:26:16 +0000
commit2c5a93e66e3e0f15b17e5dc92b503b708ce9b58f (patch)
treea316b8f734f719dfe9fecd85a2f0abfd52d621dd /g10/card-util.c
parentMerge branch 'STABLE-BRANCH-2-4' into master (diff)
downloadgnupg-2c5a93e66e3e0f15b17e5dc92b503b708ce9b58f.tar.gz
gnupg-2c5a93e66e3e0f15b17e5dc92b503b708ce9b58f.zip
gpg:card: Remove the code for GnuPG version 1.
* g10/card-util.c [GNUPG_MAJOR_VERSION == 1] (get_data_from_file): Remove the old code. (put_data_to_file): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/card-util.c')
-rw-r--r--g10/card-util.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/g10/card-util.c b/g10/card-util.c
index d680c4d0a..631f48d9d 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -28,9 +28,7 @@
# include <readline/readline.h>
#endif /*HAVE_LIBREADLINE*/
-#if GNUPG_MAJOR_VERSION != 1
# include "gpg.h"
-#endif /*GNUPG_MAJOR_VERSION != 1*/
#include "../common/util.h"
#include "../common/i18n.h"
#include "../common/ttyio.h"
@@ -39,11 +37,7 @@
#include "main.h"
#include "keyserver-internal.h"
-#if GNUPG_MAJOR_VERSION == 1
-# include "cardglue.h"
-#else /*GNUPG_MAJOR_VERSION!=1*/
-# include "call-agent.h"
-#endif /*GNUPG_MAJOR_VERSION!=1*/
+#include "call-agent.h"
#define CONTROL_D ('D' - 'A' + 1)
@@ -942,14 +936,6 @@ get_data_from_file (const char *fname, char **r_buffer)
*r_buffer = NULL;
fp = es_fopen (fname, "rb");
-#if GNUPG_MAJOR_VERSION == 1
- if (fp && is_secured_file (fileno (fp)))
- {
- fclose (fp);
- fp = NULL;
- errno = EPERM;
- }
-#endif
if (!fp)
{
tty_printf (_("can't open '%s': %s\n"), fname, strerror (errno));
@@ -985,14 +971,6 @@ put_data_to_file (const char *fname, const void *buffer, size_t length)
estream_t fp;
fp = es_fopen (fname, "wb");
-#if GNUPG_MAJOR_VERSION == 1
- if (fp && is_secured_file (fileno (fp)))
- {
- fclose (fp);
- fp = NULL;
- errno = EPERM;
- }
-#endif
if (!fp)
{
tty_printf (_("can't create '%s': %s\n"), fname, strerror (errno));