version 1.52, 2010/05/20 23:46:02 |
version 1.53, 2010/08/31 09:58:37 |
|
|
buffer_append(&c, optblob, optblob_len); |
buffer_append(&c, optblob, optblob_len); |
|
|
while (buffer_len(&c) > 0) { |
while (buffer_len(&c) > 0) { |
if ((name = buffer_get_string_ret(&c, &nlen)) == NULL || |
if ((name = buffer_get_cstring_ret(&c, &nlen)) == NULL || |
(data_blob = buffer_get_string_ret(&c, &dlen)) == NULL) { |
(data_blob = buffer_get_string_ret(&c, &dlen)) == NULL) { |
error("Certificate options corrupt"); |
error("Certificate options corrupt"); |
goto out; |
goto out; |
|
|
} |
} |
if (!found && (which & OPTIONS_CRITICAL) != 0) { |
if (!found && (which & OPTIONS_CRITICAL) != 0) { |
if (strcmp(name, "force-command") == 0) { |
if (strcmp(name, "force-command") == 0) { |
if ((command = buffer_get_string_ret(&data, |
if ((command = buffer_get_cstring_ret(&data, |
&clen)) == NULL) { |
&clen)) == NULL) { |
error("Certificate constraint \"%s\" " |
error("Certificate constraint \"%s\" " |
"corrupt", name); |
"corrupt", name); |
|
|
found = 1; |
found = 1; |
} |
} |
if (strcmp(name, "source-address") == 0) { |
if (strcmp(name, "source-address") == 0) { |
if ((allowed = buffer_get_string_ret(&data, |
if ((allowed = buffer_get_cstring_ret(&data, |
&clen)) == NULL) { |
&clen)) == NULL) { |
error("Certificate constraint " |
error("Certificate constraint " |
"\"%s\" corrupt", name); |
"\"%s\" corrupt", name); |