本文整理汇总了PHP中is_cert_revoked函数的典型用法代码示例。如果您正苦于以下问题:PHP is_cert_revoked函数的具体用法?PHP is_cert_revoked怎么用?PHP is_cert_revoked使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_cert_revoked函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lookup_ca
$caname = "";
$inuse = "";
$revoked = "";
if (isset($cert['caref'])) {
$ca = lookup_ca($cert['caref']);
if (!empty($ca)) {
$caname = " (CA: {$ca['descr']})";
}
}
if ($pconfig['certref'] == $cert['refid']) {
$selected = "selected=\"selected\"";
}
if (cert_in_use($cert['refid'])) {
$inuse = " *In Use";
}
if (is_cert_revoked($cert)) {
$revoked = " *Revoked";
}
?>
<option value="<?php
echo htmlspecialchars($cert['refid']);
?>
" <?php
echo $selected;
?>
><?php
echo htmlspecialchars($cert['descr'] . $caname . $inuse . $revoked);
?>
</option>
<?php
}
示例2: build_cert_table
function build_cert_table()
{
global $a_user, $id;
$certhtml = '<div class="table-responsive">';
$certhtml .= '<table class="table table-striped table-hover table-condensed">';
$certhtml .= '<thead>';
$certhtml .= '<tr>';
$certhtml .= '<th>' . gettext('Name') . '</th>';
$certhtml .= '<th>' . gettext('CA') . '</th>';
$certhtml .= '<th></th>';
$certhtml .= '</tr>';
$certhtml .= '</thead>';
$certhtml .= '<tbody>';
$a_cert = $a_user[$id]['cert'];
if (is_array($a_cert)) {
$i = 0;
foreach ($a_cert as $certref) {
$cert = lookup_cert($certref);
$ca = lookup_ca($cert['caref']);
$revokedstr = is_cert_revoked($cert) ? '<b> Revoked</b>' : '';
$certhtml .= '<tr>';
$certhtml .= '<td>' . htmlspecialchars($cert['descr']) . $revokedstr . '</td>';
$certhtml .= '<td>' . htmlspecialchars($ca['descr']) . '</td>';
$certhtml .= '<td>';
$certhtml .= '<a id="delcert' . $i . '" class="fa fa-trash no-confirm icon-pointer" title="';
$certhtml .= gettext('Remove this certificate association? (Certificate will not be deleted)') . '"></a>';
$certhtml .= '</td>';
$certhtml .= '</tr>';
$i++;
}
}
$certhtml .= '</tbody>';
$certhtml .= '</table>';
$certhtml .= '</div>';
$certhtml .= '<nav class="action-buttons">';
$certhtml .= '<a href="system_certmanager.php?act=new&userid=' . $id . '" class="btn btn-success">' . gettext("Add") . '</a>';
$certhtml .= '</nav>';
return $certhtml;
}
示例3: foreach
</td>
<td></td>
</tr>
<?php
if (isset($a_user[$id]['cert']) && is_array($a_user[$id]['cert'])) {
$i = 0;
foreach ($a_user[$id]['cert'] as $certref) {
$cert = lookup_cert($certref);
$ca = lookup_ca($cert['caref']);
?>
<tr>
<td><?php
echo htmlspecialchars($cert['descr']);
?>
<?php
echo is_cert_revoked($cert) ? "(<b>" . gettext('Revoked') . "</b>)" : "";
?>
</td>
<td>
<?php
echo htmlspecialchars($ca['descr']);
?>
</td>
<td>
<a href="system_usermanager.php?act=expckey&certid=<?php
echo $i;
?>
&userid=<?php
echo $id;
?>
"
示例4: build_cert_list
function build_cert_list()
{
global $a_cert;
$list = array('' => 'None (Username and/or Password required)');
foreach ($a_cert as $cert) {
$caname = "";
$inuse = "";
$revoked = "";
$ca = lookup_ca($cert['caref']);
if ($ca) {
$caname = " (CA: {$ca['descr']})";
}
if ($pconfig['certref'] == $cert['refid']) {
$selected = "selected=\"selected\"";
}
if (cert_in_use($cert['refid'])) {
$inuse = " *In Use";
}
if (is_cert_revoked($cert)) {
$revoked = " *Revoked";
}
$list[$cert['refid']] = $cert['descr'] . $caname . $inuse . $revoked;
}
return $list;
}
示例5: array
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
?>
</div>
</div>
<?php
$ca_certs = array();
foreach ($a_cert as $cert) {
if ($cert['caref'] == $crl['caref'] && !is_cert_revoked($cert, $id)) {
$ca_certs[] = $cert;
}
}
if (count($ca_certs) == 0) {
print_info_box(gettext("No certificates found for this CA."), 'danger');
} else {
$section = new Form_Section('Choose a Certificate to Revoke');
$group = new Form_Group(null);
$group->add(new Form_Select('certref', null, $pconfig['certref'], build_cacert_list()))->setWidth(4)->setHelp('Certificate');
$group->add(new Form_Select('crlreason', null, -1, $openssl_crl_status))->setHelp('Reason');
$group->add(new Form_Button('submit', 'Add', null, 'fa-plus'))->addClass('btn-success btn-sm');
$section->add($group);
$section->addInput(new Form_Input('id', null, 'hidden', $crl['refid']));
$section->addInput(new Form_Input('act', null, 'hidden', 'addcert'));
$section->addInput(new Form_Input('crlref', null, 'hidden', $crl['refid']));