Skip to content
Snippets Groups Projects
Commit 72e63b91 authored by Niels Möller's avatar Niels Möller
Browse files

* 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
parent 64776de1
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ dsa_keypair_from_sexp_alist(struct dsa_public_key *pub, ...@@ -54,7 +54,7 @@ dsa_keypair_from_sexp_alist(struct dsa_public_key *pub,
unsigned limit, unsigned limit,
struct sexp_iterator *i) struct sexp_iterator *i)
{ {
static const uint8_t *names[5] static const uint8_t * const names[5]
= { "p", "q", "g", "y", "x" }; = { "p", "q", "g", "y", "x" };
struct sexp_iterator values[5]; struct sexp_iterator values[5];
unsigned nvalues = priv ? 5 : 4; unsigned nvalues = priv ? 5 : 4;
...@@ -91,7 +91,7 @@ int ...@@ -91,7 +91,7 @@ int
dsa_signature_from_sexp(struct dsa_signature *rs, dsa_signature_from_sexp(struct dsa_signature *rs,
struct sexp_iterator *i) 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]; struct sexp_iterator values[2];
if (!sexp_iterator_assoc(i, 2, names, values)) if (!sexp_iterator_assoc(i, 2, names, values))
......
...@@ -54,7 +54,7 @@ rsa_keypair_from_sexp_alist(struct rsa_public_key *pub, ...@@ -54,7 +54,7 @@ rsa_keypair_from_sexp_alist(struct rsa_public_key *pub,
unsigned limit, unsigned limit,
struct sexp_iterator *i) 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" }; = { "n", "e", "d", "p", "q", "a", "b", "c" };
struct sexp_iterator values[8]; struct sexp_iterator values[8];
unsigned nvalues = priv ? 8 : 2; unsigned nvalues = priv ? 8 : 2;
...@@ -94,7 +94,7 @@ rsa_keypair_from_sexp(struct rsa_public_key *pub, ...@@ -94,7 +94,7 @@ rsa_keypair_from_sexp(struct rsa_public_key *pub,
unsigned length, const uint8_t *expr) unsigned length, const uint8_t *expr)
{ {
struct sexp_iterator i; struct sexp_iterator i;
static const uint8_t *names[3] static const uint8_t * const names[3]
= { "rsa", "rsa-pkcs1", "rsa-pkcs1-sha1" }; = { "rsa", "rsa-pkcs1", "rsa-pkcs1-sha1" };
if (!sexp_iterator_first(&i, length, expr)) if (!sexp_iterator_first(&i, length, expr))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment