From: Niels Möller Date: Tue, 5 Oct 2004 21:45:48 +0000 (+0200) Subject: * sexp2dsa.c (dsa_keypair_from_sexp_alist): Use a const pointer X-Git-Tag: nettle_1.11_release_20041026~45 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=72e63b91469aae4438bcf78c7a767f46f36cb18c;p=thirdparty%2Fnettle.git * sexp2dsa.c (dsa_keypair_from_sexp_alist): Use a const pointer array for the keywords. (dsa_signature_from_sexp): Likewise. * sexp2rsa.c (rsa_keypair_from_sexp_alist): Likewise. (rsa_keypair_from_sexp): Likewise. Rev: src/nettle/sexp2dsa.c:1.5 Rev: src/nettle/sexp2rsa.c:1.12 --- diff --git a/sexp2dsa.c b/sexp2dsa.c index cb76853f..c947546f 100644 --- a/sexp2dsa.c +++ b/sexp2dsa.c @@ -54,7 +54,7 @@ dsa_keypair_from_sexp_alist(struct dsa_public_key *pub, unsigned limit, struct sexp_iterator *i) { - static const uint8_t *names[5] + static const uint8_t * const names[5] = { "p", "q", "g", "y", "x" }; struct sexp_iterator values[5]; unsigned nvalues = priv ? 5 : 4; @@ -91,7 +91,7 @@ int dsa_signature_from_sexp(struct dsa_signature *rs, struct sexp_iterator *i) { - static const uint8_t *names[2] = { "r", "s" }; + static const uint8_t * const names[2] = { "r", "s" }; struct sexp_iterator values[2]; if (!sexp_iterator_assoc(i, 2, names, values)) diff --git a/sexp2rsa.c b/sexp2rsa.c index 48fe3abe..9416ba98 100644 --- a/sexp2rsa.c +++ b/sexp2rsa.c @@ -54,7 +54,7 @@ rsa_keypair_from_sexp_alist(struct rsa_public_key *pub, unsigned limit, struct sexp_iterator *i) { - static const uint8_t *names[8] + static const uint8_t * const names[8] = { "n", "e", "d", "p", "q", "a", "b", "c" }; struct sexp_iterator values[8]; unsigned nvalues = priv ? 8 : 2; @@ -94,7 +94,7 @@ rsa_keypair_from_sexp(struct rsa_public_key *pub, unsigned length, const uint8_t *expr) { struct sexp_iterator i; - static const uint8_t *names[3] + static const uint8_t * const names[3] = { "rsa", "rsa-pkcs1", "rsa-pkcs1-sha1" }; if (!sexp_iterator_first(&i, length, expr))