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

* src/dsa.c (make_ssh_dss_verifier): Take length and pointer as

arguments, not a struct lsh_string *. Updated callers.
* src/rsa.c (make_ssh_rsa_verifier): Likewise.

Rev: src/dsa.c:1.42.2.1
Rev: src/lsh.c:1.200.2.2
Rev: src/lsh_proxy.c:1.37.2.1
Rev: src/publickey_crypto.h:1.53.2.2
Rev: src/rsa.c:1.29.2.1
Rev: src/server_authorization.c:1.23.2.1
parent 0fe33a1d
......@@ -371,12 +371,12 @@ make_dsa_algorithm(struct randomness *random)
struct verifier *
make_ssh_dss_verifier(const struct lsh_string *public)
make_ssh_dss_verifier(uint32_t length, const uint8_t *key)
{
struct simple_buffer buffer;
int atom;
simple_buffer_init(&buffer, STRING_LD(public));
simple_buffer_init(&buffer, length, key);
return ( (parse_atom(&buffer, &atom)
&& (atom == ATOM_SSH_DSS))
......
......@@ -400,7 +400,7 @@ do_lsh_lookup(struct lookup_verifier *c,
case ATOM_SSH_DSS:
{
struct lsh_string *spki_key;
struct verifier *v = make_ssh_dss_verifier(key);
struct verifier *v = make_ssh_dss_verifier(STRING_LD(key));
if (!v)
{
......@@ -421,7 +421,7 @@ do_lsh_lookup(struct lookup_verifier *c,
case ATOM_SSH_RSA:
{
struct lsh_string *spki_key;
struct verifier *v = make_ssh_rsa_verifier(key);
struct verifier *v = make_ssh_rsa_verifier(STRING_LD(key));
if (!v)
{
......
......@@ -410,7 +410,7 @@ do_host_lookup(struct lookup_verifier *c UNUSED,
switch(method)
{
case ATOM_SSH_DSS:
return make_ssh_dss_verifier(key->length, key->data);
return make_ssh_dss_verifier(STRING_LD(key));
default:
return NULL;
}
......
......@@ -190,7 +190,7 @@ struct verifier *
parse_ssh_rsa_public(struct simple_buffer *buffer);
struct verifier *
make_ssh_rsa_verifier(const struct lsh_string *public);
make_ssh_rsa_verifier(uint32_t length, const uint8_t *key);
/* DSA signatures */
......@@ -203,7 +203,7 @@ struct verifier *
parse_ssh_dss_public(struct simple_buffer *buffer);
struct verifier *
make_ssh_dss_verifier(const struct lsh_string *public);
make_ssh_dss_verifier(uint32_t length, const uint8_t *key);
#endif /* LSH_PUBLICKEY_CRYPTO_H_INCLUDED */
......@@ -312,12 +312,12 @@ struct signature_algorithm rsa_sha1_algorithm =
{ STATIC_HEADER, make_rsa_signer, make_rsa_verifier };
struct verifier *
make_ssh_rsa_verifier(const struct lsh_string *public)
make_ssh_rsa_verifier(uint32_t length, const uint8_t *key)
{
struct simple_buffer buffer;
int atom;
simple_buffer_init(&buffer, STRING_LD(public));
simple_buffer_init(&buffer, length, key);
return ( (parse_atom(&buffer, &atom)
&& (atom == ATOM_SSH_RSA))
......
......@@ -32,6 +32,7 @@
#include "server_authorization.h"
#include "format.h"
#include "lsh_string.h"
#include "publickey_crypto.h"
#include "server_userauth.h"
#include "sexp.h"
......@@ -74,11 +75,11 @@ do_key_lookup(struct lookup_verifier *c,
/* FIXME: SPKI support. */
case ATOM_SSH_DSS:
v = make_ssh_dss_verifier(key);
v = make_ssh_dss_verifier(STRING_LD(key));
break;
case ATOM_SSH_RSA:
v = make_ssh_rsa_verifier(key);
v = make_ssh_rsa_verifier(STRING_LD(key));
break;
}
......
Supports Markdown
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