projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c9a6db
)
Check for mandatory random data length if public key auth.
author
Pekka Riikonen
<priikone@silcnet.org>
Sat, 13 Apr 2002 17:15:58 +0000
(17:15 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sat, 13 Apr 2002 17:15:58 +0000
(17:15 +0000)
lib/silccore/silcauth.c
patch
|
blob
|
history
diff --git
a/lib/silccore/silcauth.c
b/lib/silccore/silcauth.c
index e38eff0b3b5171e918271e8fbb8c5963fc083d40..0ac793695fd70b1718f968815934841ca3f0ecb9 100644
(file)
--- a/
lib/silccore/silcauth.c
+++ b/
lib/silccore/silcauth.c
@@
-79,6
+79,12
@@
SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
return NULL;
}
+ /* If public key authentication, random data must be at least 128 bytes */
+ if (newp->auth_method == SILC_AUTH_PUBLIC_KEY && newp->random_len < 128) {
+ silc_auth_payload_free(newp);
+ return NULL;
+ }
+
return newp;
}