aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/crypto_rsa.c')
-rw-r--r--src/util/crypto_rsa.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index a985d8e59..1225aba73 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -2,16 +2,18 @@
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2014,2016 GNUnet e.V. 3 Copyright (C) 2014,2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify it under the 5 GNUnet is free software: you can redistribute it and/or modify it
6 terms of the GNU General Public License as published by the Free Software 6 under the terms of the GNU Affero General Public License as published
7 Foundation; either version 3, or (at your option) any later version. 7 by the Free Software Foundation, either version 3 of the License,
8 8 or (at your option) any later version.
9 GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY 9
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 10 GNUnet is distributed in the hope that it will be useful, but
11 A PARTICULAR PURPOSE. See the GNU General Public License for more details. 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 You should have received a copy of the GNU General Public License along with 13 Affero General Public License for more details.
14 GNUnet; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> 14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/ 17*/
16 18
17/** 19/**
@@ -94,7 +96,6 @@ key_from_sexp (gcry_mpi_t *array,
94 gcry_sexp_t list; 96 gcry_sexp_t list;
95 gcry_sexp_t l2; 97 gcry_sexp_t l2;
96 const char *s; 98 const char *s;
97 unsigned int i;
98 unsigned int idx; 99 unsigned int idx;
99 100
100 if (! (list = gcry_sexp_find_token (sexp, topname, 0))) 101 if (! (list = gcry_sexp_find_token (sexp, topname, 0)))
@@ -109,7 +110,7 @@ key_from_sexp (gcry_mpi_t *array,
109 { 110 {
110 if (! (l2 = gcry_sexp_find_token (list, s, 1))) 111 if (! (l2 = gcry_sexp_find_token (list, s, 1)))
111 { 112 {
112 for (i = 0; i < idx; i++) 113 for (unsigned int i = 0; i < idx; i++)
113 { 114 {
114 gcry_free (array[i]); 115 gcry_free (array[i]);
115 array[i] = NULL; 116 array[i] = NULL;
@@ -121,7 +122,7 @@ key_from_sexp (gcry_mpi_t *array,
121 gcry_sexp_release (l2); 122 gcry_sexp_release (l2);
122 if (! array[idx]) 123 if (! array[idx])
123 { 124 {
124 for (i = 0; i < idx; i++) 125 for (unsigned int i = 0; i < idx; i++)
125 { 126 {
126 gcry_free (array[i]); 127 gcry_free (array[i]);
127 array[i] = NULL; 128 array[i] = NULL;
@@ -720,7 +721,7 @@ rsa_full_domain_hash (const struct GNUNET_CRYPTO_RsaPublicKey *pkey,
720 * @param pkey the public key of the signer 721 * @param pkey the public key of the signer
721 * @param[out] buf set to a buffer with the blinded message to be signed 722 * @param[out] buf set to a buffer with the blinded message to be signed
722 * @param[out] buf_size number of bytes stored in @a buf 723 * @param[out] buf_size number of bytes stored in @a buf
723 * @return GNUNET_YES if successful, GNUNET_NO if RSA key is malicious 724 * @return #GNUNET_YES if successful, #GNUNET_NO if RSA key is malicious
724 */ 725 */
725int 726int
726GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, 727GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,