当前位置: 首页>>代码示例>>PHP>>正文


PHP is_cert_revoked函数代码示例

本文整理汇总了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 
        }
开发者ID:aya,项目名称:core,代码行数:31,代码来源:vpn_openvpn_server.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&amp;userid=' . $id . '" class="btn btn-success">' . gettext("Add") . '</a>';
    $certhtml .= '</nav>';
    return $certhtml;
}
开发者ID:sjourdois,项目名称:pfsense,代码行数:39,代码来源:system_usermanager.php

示例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&amp;certid=<?php 
                echo $i;
                ?>
&amp;userid=<?php 
                echo $id;
                ?>
"
开发者ID:alisamar,项目名称:core,代码行数:31,代码来源:system_usermanager.php

示例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;
}
开发者ID:vasiqmz,项目名称:pfsense,代码行数:25,代码来源:vpn_openvpn_client.php

示例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']));
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:31,代码来源:system_crlmanager.php


注:本文中的is_cert_revoked函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。