- djm@cvs.openbsd.org 2011/10/18 04:58:26

[auth-options.c key.c]
     remove explict search for \0 in packet strings, this job is now done
     implicitly by buffer_get_cstring; ok markus
This commit is contained in:
Damien Miller 2011-10-18 16:06:14 +11:00
parent 91f3eaec88
commit c51a5ab2c6
3 changed files with 6 additions and 21 deletions

View File

@ -12,6 +12,10 @@
- stsp@cvs.openbsd.org 2011/10/16 15:51:39 - stsp@cvs.openbsd.org 2011/10/16 15:51:39
[moduli.c] [moduli.c]
add missing includes to unbreak tree; fix from rpointel add missing includes to unbreak tree; fix from rpointel
- djm@cvs.openbsd.org 2011/10/18 04:58:26
[auth-options.c key.c]
remove explict search for \0 in packet strings, this job is now done
implicitly by buffer_get_cstring; ok markus
20111001 20111001
- (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm

View File

@ -1,4 +1,4 @@
/* $OpenBSD: auth-options.c,v 1.55 2011/09/23 00:22:04 dtucker Exp $ */ /* $OpenBSD: auth-options.c,v 1.56 2011/10/18 04:58:26 djm Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -452,10 +452,6 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw,
buffer_append(&data, data_blob, dlen); buffer_append(&data, data_blob, dlen);
debug3("found certificate option \"%.100s\" len %u", debug3("found certificate option \"%.100s\" len %u",
name, dlen); name, dlen);
if (strlen(name) != nlen) {
error("Certificate constraint name contains \\0");
goto out;
}
found = 0; found = 0;
if ((which & OPTIONS_EXTENSIONS) != 0) { if ((which & OPTIONS_EXTENSIONS) != 0) {
if (strcmp(name, "permit-X11-forwarding") == 0) { if (strcmp(name, "permit-X11-forwarding") == 0) {
@ -485,11 +481,6 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw,
"corrupt", name); "corrupt", name);
goto out; goto out;
} }
if (strlen(command) != clen) {
error("force-command constraint "
"contains \\0");
goto out;
}
if (*cert_forced_command != NULL) { if (*cert_forced_command != NULL) {
error("Certificate has multiple " error("Certificate has multiple "
"force-command options"); "force-command options");
@ -506,11 +497,6 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw,
"\"%s\" corrupt", name); "\"%s\" corrupt", name);
goto out; goto out;
} }
if (strlen(allowed) != clen) {
error("source-address constraint "
"contains \\0");
goto out;
}
if ((*cert_source_address_done)++) { if ((*cert_source_address_done)++) {
error("Certificate has multiple " error("Certificate has multiple "
"source-address options"); "source-address options");

7
key.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: key.c,v 1.97 2011/05/17 07:13:31 djm Exp $ */ /* $OpenBSD: key.c,v 1.98 2011/10/18 04:58:26 djm Exp $ */
/* /*
* read_bignum(): * read_bignum():
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -1356,11 +1356,6 @@ cert_parse(Buffer *b, Key *key, const u_char *blob, u_int blen)
goto out; goto out;
} }
if (kidlen != strlen(key->cert->key_id)) {
error("%s: key ID contains \\0 character", __func__);
goto out;
}
/* Signature is left in the buffer so we can calculate this length */ /* Signature is left in the buffer so we can calculate this length */
signed_len = buffer_len(&key->cert->certblob) - buffer_len(b); signed_len = buffer_len(&key->cert->certblob) - buffer_len(b);