* examples/io.c (read_rsa_key): Deleted, moved to...
* examples/read_rsa_key.c: New file, extracted from io.c.
Rev: nettle/examples/io.c:1.2
Rev: nettle/examples/io.h:1.2
return 1;
}
}
-
-#if WITH_PUBLIC_KEY
-int
-read_rsa_key(const char *name,
- struct rsa_public_key *pub,
- struct rsa_private_key *priv)
-{
- unsigned length;
- char *buffer;
- int res;
-
- length = read_file(name, 0, &buffer);
- if (!length)
- return 0;
-
- res = rsa_keypair_from_sexp(pub, priv, 0, length, buffer);
- free(buffer);
-
- return res;
-}
-#endif /* WITH_PUBLIC_KEY */
#define NETTLE_EXAMPLES_IO_H_INCLUDED
#include "nettle-meta.h"
-#if WITH_PUBLIC_KEY
-# include "rsa.h"
-#endif
#include "yarrow.h"
#include <stdio.h>
int
hash_file(const struct nettle_hash *hash, void *ctx, FILE *f);
-#if WITH_PUBLIC_KEY
+#if WITH_HOGWEED
struct rsa_public_key;
struct rsa_private_key;
read_rsa_key(const char *name,
struct rsa_public_key *pub,
struct rsa_private_key *priv);
-#endif /* WITH_PUBLIC_KEY */
+#endif /* WITH_HOGWEED */
#endif /* NETTLE_EXAMPLES_IO_H_INCLUDED */