PHP Classes

File: web/SSO/vendor/simplesamlphp/xmlseclibs/tests/thumbprint.phpt

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/vendor/simplesamlphp/xmlseclibs/tests/thumbprint.phpt   Download  
File: web/SSO/vendor/simplesamlphp/xmlseclibs/tests/thumbprint.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 474 bytes
 

Contents

Class file image Download
--TEST--
Certificate thumbprint check
--FILE--
<?php
require(dirname(__FILE__) . '/../xmlseclibs.php');

$siteKey = new XMLSecurityKey(XMLSecurityKey::RSA_OAEP_MGF1P, array('type'=>'public'));
$siteKey->loadKey(dirname(__FILE__) . '/mycert.pem', TRUE, TRUE);

$thumbprint = $siteKey->getX509Thumbprint();
echo
$thumbprint."\n";
echo
base64_encode($thumbprint);
?>
--EXPECTF--
8b600d9155e8e8dfa3c10998f736be086e83ef3b
OGI2MDBkOTE1NWU4ZThkZmEzYzEwOTk4ZjczNmJlMDg2ZTgzZWYzYg==