當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。