From 04bfa6fe6597b8ffcec61cbcacdc7eb137444e80 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 16 Feb 2017 14:07:27 +0100 Subject: [PATCH] sm,common: Move ksba reader and writer support to common/. * sm/base64.c: Rename to ... * common/ksba-io-support.c: this. * common/ksba-io-support.h: New. * common/Makefile.am (common_sources): Add new files. * sm/Makefile.am (gpgsm_SOURCES): Remove base64.c Signed-off-by: Werner Koch --- common/Makefile.am | 4 ++- sm/base64.c => common/ksba-io-support.c | 4 +-- common/ksba-io-support.h | 33 +++++++++++++++++++++++++ sm/Makefile.am | 1 - 4 files changed, 38 insertions(+), 4 deletions(-) rename sm/base64.c => common/ksba-io-support.c (99%) create mode 100644 common/ksba-io-support.h diff --git a/common/Makefile.am b/common/Makefile.am index 72e3fb475..68b87104a 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -91,7 +91,9 @@ common_sources = \ exectool.c exectool.h \ server-help.c server-help.h \ name-value.c name-value.h \ - recsel.c recsel.h + recsel.c recsel.h \ + ksba-io-support.c ksba-io-support.h + if HAVE_W32_SYSTEM common_sources += w32-reg.c diff --git a/sm/base64.c b/common/ksba-io-support.c similarity index 99% rename from sm/base64.c rename to common/ksba-io-support.c index f3c7def2c..a47e47bf3 100644 --- a/sm/base64.c +++ b/common/ksba-io-support.c @@ -1,4 +1,4 @@ -/* base64.c +/* kska-io-support.c - Supporting functions for ksba reader and writer * Copyright (C) 2001, 2003, 2010 Free Software Foundation, Inc. * * This file is part of GnuPG. @@ -26,7 +26,7 @@ #include #include -#include "gpgsm.h" +#include "../sm/gpgsm.h" #include diff --git a/common/ksba-io-support.h b/common/ksba-io-support.h new file mode 100644 index 000000000..7028686de --- /dev/null +++ b/common/ksba-io-support.h @@ -0,0 +1,33 @@ +/* ksba-io-support.h - Supporting functions for ksba reader and writer + * Copyright (C) 2017 Werner Koch + * + * This file is part of GnuPG. + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of either + * + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef GNUPG_KSBA_IO_SUPPORT_H +#define GNUPG_KSBA_IO_SUPPORT_H + +#endif /*GNUPG_KSBA_IO_SUPPORT_H*/ diff --git a/sm/Makefile.am b/sm/Makefile.am index a9c67a89a..4cfb24686 100644 --- a/sm/Makefile.am +++ b/sm/Makefile.am @@ -38,7 +38,6 @@ gpgsm_SOURCES = \ call-agent.c \ call-dirmngr.c \ fingerprint.c \ - base64.c \ certlist.c \ certdump.c \ certcheck.c \