diff options
Diffstat (limited to 'src/cmd/auth/factotum')
-rw-r--r-- | src/cmd/auth/factotum/rpc.c | 2 | ||||
-rw-r--r-- | src/cmd/auth/factotum/rsa.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/auth/factotum/rpc.c b/src/cmd/auth/factotum/rpc.c index 8e2b17a0..400b7de5 100644 --- a/src/cmd/auth/factotum/rpc.c +++ b/src/cmd/auth/factotum/rpc.c @@ -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); diff --git a/src/cmd/auth/factotum/rsa.c b/src/cmd/auth/factotum/rsa.c index 34ddb784..943ea67b 100644 --- a/src/cmd/auth/factotum/rsa.c +++ b/src/cmd/auth/factotum/rsa.c @@ -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"; |