Revision e2e934e0
Added by Yehuda Katz about 14 years ago
usr/local/www/system_certmanager.php | ||
---|---|---|
284 | 284 |
$subj_csr = csr_get_subject($pconfig['csr'], false); |
285 | 285 |
$subj_cert = cert_get_subject($pconfig['cert'], false); |
286 | 286 |
|
287 |
if (strcmp($subj_csr,$subj_cert)) |
|
288 |
$input_errors[] = sprintf(gettext("The certificate subject '%s' does not match the signing request subject."),$subj_cert); |
|
287 |
if ( !isset($_POST['ignoresubjectmismatch']) && !($_POST['ignoresubjectmismatch'] == "yes") ) { |
|
288 |
if (strcmp($subj_csr,$subj_cert)) { |
|
289 |
$input_errors[] = sprintf(gettext("The certificate subject '%s' does not match the signing request subject."),$subj_cert); |
|
290 |
$subject_mismatch = true; |
|
291 |
} |
|
292 |
} |
|
289 | 293 |
|
290 | 294 |
/* if this is an AJAX caller then handle via JSON */ |
291 | 295 |
if (isAjax() && is_array($input_errors)) { |
... | ... | |
776 | 780 |
<tr> |
777 | 781 |
<td width="22%" valign="top"> </td> |
778 | 782 |
<td width="78%"> |
783 |
<?php if ( isset($subject_mismatch) && $subject_mismatch === true): ?> |
|
784 |
<input id="ignoresubjectmismatch" name="ignoresubjectmismatch" type="checkbox" class="formbtn" value="yes" /> |
|
785 |
<label for="ignoresubjectmismatch"><strong><?=gettext("Ignore certificate subject mismatch"); ?></strong></label><br /> |
|
786 |
<?php echo gettext("Warning: Using this option may create an " . |
|
787 |
"invalid certificate. Check this box to disable the request -> " . |
|
788 |
"response subject verification. "); |
|
789 |
?><br/> |
|
790 |
<?php endif;?> |
|
779 | 791 |
<input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Update");?>" /> |
780 | 792 |
<?php if (isset($id) && $a_cert[$id]): ?> |
781 | 793 |
<input name="id" type="hidden" value="<?=$id;?>" /> |
Also available in: Unified diff
override option for certificate subject mismatch