]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_auth.c
Merge branch 'master' into 1.1
[meshlink] / src / protocol_auth.c
index 2109cd4d7328d8af9fe0ef638141c7a622c714ca..aa0fd36d20ab61ce373cc2952477872f41c54136 100644 (file)
@@ -124,7 +124,7 @@ bool send_metakey(connection_t *c) {
        if(!cipher_open_blowfish_ofb(&c->outcipher))
                return false;
        
-       if(!digest_open_sha1(&c->outdigest))
+       if(!digest_open_sha1(&c->outdigest, -1))
                return false;
 
        /* Create a random key */
@@ -224,7 +224,7 @@ bool metakey_h(connection_t *c, char *request) {
                return false;
        }
 
-       if(!digest_open_by_nid(&c->indigest, digest)) {
+       if(!digest_open_by_nid(&c->indigest, digest, -1)) {
                logger(LOG_ERR, _("Error during initialisation of digest from %s (%s)"), c->name, c->hostname);
                return false;
        }
@@ -243,7 +243,7 @@ bool send_challenge(connection_t *c) {
        cp();
 
        if(!c->hischallenge)
-               c->hischallenge = xmalloc(len);
+               c->hischallenge = xrealloc(c->hischallenge, len);
 
        /* Copy random data to the buffer */