Commit df200717 authored by Niels Möller's avatar Niels Möller
Browse files

(rsa_keypair_to_sexp): Use literals with sexp_format.

Rev: src/nettle/rsa2sexp.c:1.5
parent e01516ec
...@@ -39,14 +39,14 @@ rsa_keypair_to_sexp(struct nettle_buffer *buffer, ...@@ -39,14 +39,14 @@ rsa_keypair_to_sexp(struct nettle_buffer *buffer,
{ {
if (priv) if (priv)
return sexp_format(buffer, return sexp_format(buffer,
"(%0s(%0s(%0s%b)(%0s%b)(%0s%b)" "(private-key(%0s(n%b)(e%b)"
"(%0s%b)(%0s%b)(%0s%b)(%0s%b)(%0s%b)))", "(d%b)(p%b)(q%b)(a%b)(b%b)(c%b)))",
"private-key", "rsa", "n", pub->n, "e", pub->e, "rsa", pub->n, pub->e,
"d", priv->d, "p", priv->p, "q", priv->q, priv->d, priv->p, priv->q,
"a", priv->a, "b", priv->b, "c", priv->c); priv->a, priv->b, priv->c);
else else
return sexp_format(buffer, "(%0s(%0s(%0s%b)(%0s%b)))", return sexp_format(buffer, "(public-key(%0s(n%b)(e%b)))",
"public-key", "rsa", "n", pub->n, "e", pub->e); "rsa", pub->n, pub->e);
} }
#endif /* WITH_PUBLIC_KEY */ #endif /* WITH_PUBLIC_KEY */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment