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

(rsa_keypair_to_sexp): Use %0s rather than %z, when

formatting s-expressions.

Rev: src/nettle/rsa2sexp.c:1.4
parent b4142547
No related branches found
No related tags found
No related merge requests found
...@@ -39,13 +39,13 @@ rsa_keypair_to_sexp(struct nettle_buffer *buffer, ...@@ -39,13 +39,13 @@ rsa_keypair_to_sexp(struct nettle_buffer *buffer,
{ {
if (priv) if (priv)
return sexp_format(buffer, return sexp_format(buffer,
"(%z(%z(%z%b)(%z%b)(%z%b)" "(%0s(%0s(%0s%b)(%0s%b)(%0s%b)"
"(%z%b)(%z%b)(%z%b)(%z%b)(%z%b)))", "(%0s%b)(%0s%b)(%0s%b)(%0s%b)(%0s%b)))",
"private-key", "rsa", "n", pub->n, "e", pub->e, "private-key", "rsa", "n", pub->n, "e", pub->e,
"d", priv->d, "p", priv->p, "q", priv->q, "d", priv->d, "p", priv->p, "q", priv->q,
"a", priv->a, "b", priv->b, "c", priv->c); "a", priv->a, "b", priv->b, "c", priv->c);
else else
return sexp_format(buffer, "(%z(%z(%z%b)(%z%b)))", return sexp_format(buffer, "(%0s(%0s(%0s%b)(%0s%b)))",
"public-key", "rsa", "n", pub->n, "e", pub->e); "public-key", "rsa", "n", pub->n, "e", pub->e);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment