more bug fixes

This commit is contained in:
rsc 2005-02-13 23:08:55 +00:00
parent 8e4cf69e46
commit e1a2296329
3 changed files with 14 additions and 25 deletions

View file

@ -260,7 +260,7 @@ rpcrespondn(Conv *c, char *verb, void *data, int count)
p = c->reply + strlen(c->reply);
*p++ = ' ';
if(hex){
enc16(p, 2*count, data, count);
enc16(p, 2*count+1, data, count);
p += 2*count;
}else{
memmove(p, data, count);

View file

@ -66,12 +66,12 @@ xrsadecrypt(Conv *c)
if(m == nil)
goto out;
if(strcmp(role, "decrypt") == 0)
mm = rsadecrypt(key, m, m);
mm = rsadecrypt(key, m, nil);
else
mm = rsaencrypt(&key->pub, m, nil);
if(mm == nil)
goto out;
n = mptobe(m, buf, sizeof buf, nil);
n = mptobe(mm, buf, sizeof buf, nil);
/* send response */
c->state = "write";