mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
A few minor code cleanups and typo fixes.
* agent/command-ssh.c (ssh_handler_request_identities): Remove double check of ERR. * g10/getkey.c (get_pubkey_byname): Remove double use of break. * g10/pkglue.c (pk_encrypt): Handle possible NULL-ptr access due to failed malloc. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
ac731dbbbd
commit
965bb0693c
2
README
2
README
@ -1,6 +1,6 @@
|
||||
The GNU Privacy Guard 2
|
||||
=========================
|
||||
Version 2.3 (devel)
|
||||
Version 2.3
|
||||
|
||||
Copyright 1997-2019 Werner Koch
|
||||
Copyright 1998-2021 Free Software Foundation, Inc.
|
||||
|
@ -2518,7 +2518,7 @@ ssh_handler_request_identities (ctrl_t ctrl,
|
||||
xfree (cardsn);
|
||||
if (err)
|
||||
{
|
||||
if (err && opt.verbose)
|
||||
if (opt.verbose)
|
||||
gcry_log_debugsxp ("pubkey", key_public);
|
||||
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_CURVE
|
||||
|| gpg_err_code (err) == GPG_ERR_INV_CURVE)
|
||||
|
@ -1666,6 +1666,7 @@ Description of some debug flags:
|
||||
- RFC-3447 :: PKCS #1: RSA Cryptography Specifications Version 2.1
|
||||
- RFC-4880 :: OpenPGP
|
||||
- RFC-5280 :: X.509 PKI Certificate and CRL Profile
|
||||
- RFC-5652 :: CMS (STD0070)
|
||||
- RFC-6818 :: Updates to the X.509 PKI Certificate and CRL Profile
|
||||
- RFC-8398 :: Internationalized Email Addresses in X.509 Certificates.
|
||||
- RFC-8399 :: Internationalization Updates to RFC 5280
|
||||
|
@ -1164,7 +1164,6 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
||||
{
|
||||
mechanism_string = "";
|
||||
rc = GPG_ERR_NO_PUBKEY;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1180,7 +1179,6 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
||||
{
|
||||
mechanism_string = "";
|
||||
rc = GPG_ERR_NO_PUBKEY;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -424,6 +424,11 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data,
|
||||
|
||||
/* Get the shared point and the ephemeral public key. */
|
||||
shared = get_data_from_sexp (s_ciph, "s", &nshared);
|
||||
if (!shared)
|
||||
{
|
||||
rc = gpg_error_from_syserror ();
|
||||
goto leave;
|
||||
}
|
||||
rc = sexp_extract_param_sos (s_ciph, "e", &public);
|
||||
gcry_sexp_release (s_ciph);
|
||||
s_ciph = NULL;
|
||||
@ -464,6 +469,7 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data,
|
||||
resarr[1] = get_mpi_from_sexp (s_ciph, "b", GCRYMPI_FMT_USG);
|
||||
}
|
||||
|
||||
leave:
|
||||
gcry_sexp_release (s_ciph);
|
||||
return rc;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
/* Flags used by the app_write_learn_status. */
|
||||
#define APP_LEARN_FLAG_KEYPAIRINFO 1 /* Return only keypair infos. */
|
||||
#define APP_LEARN_FLAG_MULTI 2 /* Return info for all apps. */
|
||||
#define APP_LEARN_FLAG_REREAD 4 /* Re-read ifnos from the token. */
|
||||
#define APP_LEARN_FLAG_REREAD 4 /* Re-read infos from the token. */
|
||||
|
||||
|
||||
/* List of supported card types. Generic is the usual ISO7817-4
|
||||
|
Loading…
x
Reference in New Issue
Block a user