aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-02-13 23:08:55 +0000
committerrsc <devnull@localhost>2005-02-13 23:08:55 +0000
commite1a22963294b001a2a87d53df21ca990f5f7aba6 (patch)
tree10a1c1b0dbe397ad7d8f15cc111e946b1ae28823 /src/cmd/auth/factotum
parent8e4cf69e46dd53a3c63aed3c24c9659472ca363a (diff)
downloadplan9port-e1a22963294b001a2a87d53df21ca990f5f7aba6.tar.gz
plan9port-e1a22963294b001a2a87d53df21ca990f5f7aba6.tar.bz2
plan9port-e1a22963294b001a2a87d53df21ca990f5f7aba6.zip
more bug fixes
Diffstat (limited to 'src/cmd/auth/factotum')
-rw-r--r--src/cmd/auth/factotum/rpc.c2
-rw-r--r--src/cmd/auth/factotum/rsa.c4
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";