1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Use gpgrt_b64* API of libgpg-error.

* common/Makefile.am (common_sources): Remove b64enc.c and b64dec.c.
(module_maint_tests): Remove t-b64.
(t_b64_LDADD): Remove.
* common/util.h: Remove the internal API.
* common/ssh-utils.c (get_fingerprint): Use the gpgrt_b64 API.
(ssh_public_key_in_base64): Likewise.
* dirmngr/crlfetch.c (my_es_read, crl_close_reader): Likewise.
* dirmngr/dirmngr-client.c (data_cb, do_lookup): Likewise.
* dirmngr/misc.c (armor_data): Likewise.
* g10/export.c (export_one_ssh_key, export_secret_ssh_key): Likewise.
* tools/gpg-card.c (cmd_writecert): Likewise.
* tools/mime-parser.c (parse_message_cb, mime_parser_release)
(process_part_data): Likewise.
* tools/wks-util.c (wks_armor_key): Likewise.

--

GnuPG-bug-id: 6734
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-09-26 13:34:50 +09:00
parent 34f812475e
commit 26939ea222
No known key found for this signature in database
GPG key ID: 640114AF89DE6054
10 changed files with 75 additions and 99 deletions

View file

@ -2080,13 +2080,15 @@ cmd_writecert (card_info_t info, char *argstr)
&& ascii_memistr (data, datalen, "-----END CERTIFICATE-----")
&& !memchr (data, 0, datalen) && !memchr (data, 1, datalen))
{
struct b64state b64;
gpgrt_b64state_t b64;
err = b64dec_start (&b64, "");
b64 = gpgrt_b64dec_start ("");
if (!b64)
err = gpg_error_from_syserror ();
else
err = gpgrt_b64dec_proc (b64, data, datalen, &datalen);
if (!err)
err = b64dec_proc (&b64, data, datalen, &datalen);
if (!err)
err = b64dec_finish (&b64);
err = gpgrt_b64dec_finish (b64);
if (err)
goto leave;
}