Update v1.0.6
This commit is contained in:
38
vendor/namshi/jose/tests/Namshi/JOSE/Test/BCJWSTest.php
vendored
Normal file
38
vendor/namshi/jose/tests/Namshi/JOSE/Test/BCJWSTest.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test;
|
||||
|
||||
use Namshi\JOSE\Base64\Base64Encoder;
|
||||
use Namshi\JOSE\JWS;
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
/**
|
||||
* BC test for base64 url-safe fix
|
||||
* Test that tokens generated the old way (non url-safe) will work with url-safe base64 decoding
|
||||
*/
|
||||
class BCJWSTest extends TestCase
|
||||
{
|
||||
const SSL_KEY_PASSPHRASE = 'tests';
|
||||
|
||||
public function testTestBC()
|
||||
{
|
||||
$data = array(
|
||||
array("order_nr" => "ae123123"),
|
||||
array("username" => "asdasdasd"),
|
||||
array("anything" => "!@#$%^&*()_+")
|
||||
);
|
||||
|
||||
foreach ($data as $payload) {
|
||||
$jwsOld = new JWS(array("alg" => "RS256"));
|
||||
$jwsOld->setEncoder(new Base64Encoder());
|
||||
$jwsOld->setPayload($payload);
|
||||
$jwsOld->sign(openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE));
|
||||
|
||||
$t = $jwsOld->getTokenString();
|
||||
|
||||
$jwsNew = JWS::load($t);
|
||||
$this->assertTrue($jwsNew->verify(openssl_pkey_get_public(SSL_KEYS_PATH . "public.key")));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
268
vendor/namshi/jose/tests/Namshi/JOSE/Test/JWSTest.php
vendored
Normal file
268
vendor/namshi/jose/tests/Namshi/JOSE/Test/JWSTest.php
vendored
Normal file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test;
|
||||
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\JWS;
|
||||
use DateTime;
|
||||
use Prophecy\Argument;
|
||||
|
||||
class JWSTest extends TestCase
|
||||
{
|
||||
const SSL_KEY_PASSPHRASE = 'tests';
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$date = new DateTime('tomorrow');
|
||||
$data = array(
|
||||
'a' => 'b'
|
||||
);
|
||||
$this->jws = new JWS(array('alg' => 'RS256'));
|
||||
$this->jws->setPayload($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testLoadingUnsecureJwsWithNoneAlgo()
|
||||
{
|
||||
$date = new DateTime('tomorrow');
|
||||
$data = array(
|
||||
'a' => 'b',
|
||||
'exp' => $date->format('U')
|
||||
);
|
||||
$this->jws = new JWS(array('alg' => 'None'));
|
||||
$this->jws->setPayload($data);
|
||||
$this->jws->sign('111');
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$this->assertFalse($jws->verify('111'));
|
||||
|
||||
$payload = $jws->getPayload();
|
||||
$this->assertEquals('b', $payload['a']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testLoadingUnsecureJwsWithLowercaseNone()
|
||||
{
|
||||
$date = new DateTime('tomorrow');
|
||||
$data = array(
|
||||
'a' => 'b',
|
||||
'exp' => $date->format('U')
|
||||
);
|
||||
$this->jws = new JWS(array('alg' => 'none'));
|
||||
$this->jws->setPayload($data);
|
||||
$this->jws->sign('111');
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$this->assertFalse($jws->verify('111'));
|
||||
|
||||
$payload = $jws->getPayload();
|
||||
$this->assertEquals('b', $payload['a']);
|
||||
}
|
||||
|
||||
public function testAllowingUnsecureJws()
|
||||
{
|
||||
$date = new DateTime('tomorrow');
|
||||
$data = array(
|
||||
'a' => 'b',
|
||||
'exp' => $date->format('U')
|
||||
);
|
||||
$this->jws = new JWS(array('alg' => 'None'));
|
||||
$this->jws->setPayload($data);
|
||||
$this->jws->sign('111');
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString(), true);
|
||||
$this->assertTrue($jws->verify('111'));
|
||||
|
||||
$payload = $jws->getPayload();
|
||||
$this->assertEquals('b', $payload['a']);
|
||||
}
|
||||
|
||||
public function testRestrictingTheAlgorithmsKo()
|
||||
{
|
||||
$this->jws = new JWS(array('alg' => 'HS256'));
|
||||
$this->jws->sign('12345');
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$this->assertFalse($jws->verify('12345', 'RS256'));
|
||||
}
|
||||
|
||||
public function testRestrictingTheAlgorithmsOk()
|
||||
{
|
||||
$date = new DateTime('tomorrow');
|
||||
$data = array(
|
||||
'a' => 'b',
|
||||
'exp' => $date->format('U')
|
||||
);
|
||||
$this->jws = new JWS(array('alg' => 'HS256'));
|
||||
$this->jws->setPayload($data);
|
||||
$this->jws->sign('123');
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$this->assertTrue($jws->verify('123', 'HS256'));
|
||||
}
|
||||
|
||||
public function testVerificationRS256()
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey);
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->assertTrue($jws->verify($public_key));
|
||||
|
||||
$payload = $jws->getPayload();
|
||||
$this->assertEquals('b', $payload['a']);
|
||||
}
|
||||
|
||||
public function testVerificationRS256KeyAsString()
|
||||
{
|
||||
$privateKey = file_get_contents(TEST_DIR . "/private.key");//, self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey, self::SSL_KEY_PASSPHRASE);
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->assertTrue($jws->verify($public_key));
|
||||
|
||||
$payload = $jws->getPayload();
|
||||
$this->assertEquals('b', $payload['a']);
|
||||
}
|
||||
|
||||
public function testUseOfCustomEncoder()
|
||||
{
|
||||
$encoder = $this->prophesize('Namshi\JOSE\Base64\Encoder');
|
||||
$encoder
|
||||
->decode(Argument::any())
|
||||
->willReturn('{"whatever": "the payload should be"}')
|
||||
->shouldBeCalled();
|
||||
$encoder
|
||||
->decode(Argument::any())
|
||||
->willReturn('{"alg": "test"}')
|
||||
->shouldBeCalled();
|
||||
JWS::load($this->jws->getTokenString(), false, $encoder->reveal());
|
||||
}
|
||||
|
||||
public function testVerificationThatTheJWSIsSigned()
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey);
|
||||
$this->assertTrue($this->jws->isSigned());
|
||||
}
|
||||
|
||||
public function testVerificationThatTheJWSIsNotSigned()
|
||||
{
|
||||
$this->assertFalse($this->jws->isSigned());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testWrongVerificationRS256()
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey);
|
||||
|
||||
$jws = JWS::load('eyJhbGciOiJ0ZXN0In0=.eyJhbGciOiJ0ZXN0In0=.eyJhbGciOiJ0ZXN0In0=');
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->assertFalse($jws->verify($public_key));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testLoadingAMalformedTokenString()
|
||||
{
|
||||
JWS::load('test.Test.TEST');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testLoadingAMalformedTokenString2()
|
||||
{
|
||||
JWS::load('test');
|
||||
}
|
||||
|
||||
public function testSignAndVerifyWithFalsePublicKey()
|
||||
{
|
||||
$public_key = false;
|
||||
$jwsHMAC = new JWS(array('alg' => 'HS256'));
|
||||
|
||||
$jwsHMAC->sign(false);
|
||||
$jws = JWS::load($jwsHMAC->getTokenString());
|
||||
|
||||
$this->assertFalse($jws->verify($public_key));
|
||||
|
||||
}
|
||||
|
||||
public function testSignAndVerifyWithEmptyStringPublicKey()
|
||||
{
|
||||
$public_key = false;
|
||||
$jwsHMAC = new JWS(array('alg' => 'HS256'));
|
||||
|
||||
$jwsHMAC->sign('');
|
||||
$jws = JWS::load($jwsHMAC->getTokenString());
|
||||
|
||||
$this->assertFalse($jws->verify($public_key));
|
||||
|
||||
}
|
||||
|
||||
public function testLoadingWithAnyOrderOfHeaders()
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
|
||||
$this->jws = new JWS(array('alg' => 'RS256', 'custom' => '1'));
|
||||
|
||||
$header = $this->jws->getHeader();
|
||||
$reversedHeader = array_reverse($header);
|
||||
$this->assertFalse($header === $reversedHeader);
|
||||
|
||||
$this->jws->setHeader($reversedHeader);
|
||||
$this->jws->sign($privateKey);
|
||||
|
||||
$tokenString = $this->jws->getTokenString();
|
||||
$jws = JWS::load($tokenString);
|
||||
$this->assertTrue($reversedHeader === $jws->getHeader());
|
||||
}
|
||||
|
||||
public function testSignAndVerifyWithSecLib()
|
||||
{
|
||||
$jwsRSA = new JWS(array('alg' => 'RS256'), 'SecLib');
|
||||
$data = array('a' => 'b',);
|
||||
$jwsRSA->setPayload($data);
|
||||
|
||||
$jwsRSA->sign(file_get_contents(SSL_KEYS_PATH . "private.key"), 'tests');
|
||||
$jws = JWS::load($jwsRSA->getTokenString(), false, null, 'SecLib');
|
||||
|
||||
$this->assertTrue($jws->verify(file_get_contents(SSL_KEYS_PATH . "public.key", 'RS256')));
|
||||
}
|
||||
|
||||
public function testConstructionFromHeader()
|
||||
{
|
||||
$header = array('alg' => 'RS256', 'test' => true);
|
||||
$jws = new JWS($header);
|
||||
|
||||
$this->assertTrue($header == $jws->getHeader());
|
||||
}
|
||||
|
||||
public function testVerificationCustomizedHeader()
|
||||
{
|
||||
$header = $this->jws->getHeader();
|
||||
$header['test'] = true;
|
||||
$this->jws->setHeader($header);
|
||||
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey);
|
||||
|
||||
$jws = JWS::load($this->jws->getTokenString());
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$headerFromSig = $jws->getHeader();
|
||||
|
||||
$this->assertSame($headerFromSig['test'], true);
|
||||
$this->assertTrue($jws->verify($public_key));
|
||||
}
|
||||
}
|
||||
35
vendor/namshi/jose/tests/Namshi/JOSE/Test/JWTTest.php
vendored
Normal file
35
vendor/namshi/jose/tests/Namshi/JOSE/Test/JWTTest.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test;
|
||||
|
||||
use Namshi\JOSE\Base64\Base64UrlSafeEncoder;
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\JWT;
|
||||
|
||||
class JWTTest extends TestCase
|
||||
{
|
||||
public function testGenerationOfTheSigninInput()
|
||||
{
|
||||
$payload = array('b' => 'a', 'iat' => 1421161177);
|
||||
$header = array('a' => 'b');
|
||||
$jwt = new JWT($payload, $header);
|
||||
$encoder = new Base64UrlSafeEncoder();
|
||||
|
||||
$this->assertEquals(sprintf("%s.%s", $encoder->encode(json_encode($header)), $encoder->encode(json_encode($payload))), $jwt->generateSigninInput());
|
||||
}
|
||||
|
||||
public function testPayload()
|
||||
{
|
||||
$jwt = new JWT(array('a' => 'b'), array());
|
||||
$payload = $jwt->getPayload();
|
||||
|
||||
$this->assertSame(array('a' => 'b'), $payload);
|
||||
|
||||
$jwt = new JWT(array('a' => 'b'), array());
|
||||
$jwt->setPayload(array('b' => 'a'));
|
||||
$payload = $jwt->getPayload();
|
||||
|
||||
$this->assertSame($payload['b'], 'a');
|
||||
$this->assertSame(array('b' => 'a'), $payload);
|
||||
}
|
||||
}
|
||||
44
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/ES256Test.php
vendored
Normal file
44
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/ES256Test.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\OpenSSL\ES256;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class ES256Test extends TestCase
|
||||
{
|
||||
|
||||
public function setup()
|
||||
{
|
||||
// https://github.com/sebastianbergmann/phpunit/issues/1356
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$this->markTestSkipped();
|
||||
}
|
||||
$this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.es256.key");
|
||||
$this->public = openssl_pkey_get_public(SSL_KEYS_PATH . "public.es256.key");
|
||||
$this->signer = new ES256;
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage Invalid key supplied.
|
||||
*/
|
||||
public function testWrongKeyCurve()
|
||||
{
|
||||
$privateKey512 = openssl_pkey_get_private(SSL_KEYS_PATH . "private.es512.key");
|
||||
$this->signer->sign('aaa', $privateKey512);
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey));
|
||||
}
|
||||
|
||||
}
|
||||
34
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/ES384Test.php
vendored
Normal file
34
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/ES384Test.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\OpenSSL\ES384;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class ES384Test extends TestCase
|
||||
{
|
||||
|
||||
public function setup()
|
||||
{
|
||||
// https://github.com/sebastianbergmann/phpunit/issues/1356
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$this->markTestSkipped();
|
||||
}
|
||||
$this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.es384.key", 'tests');
|
||||
$this->public = openssl_pkey_get_public(SSL_KEYS_PATH . "public.es384.key");
|
||||
$this->signer = new ES384;
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey));
|
||||
}
|
||||
|
||||
}
|
||||
34
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/ES512Test.php
vendored
Normal file
34
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/ES512Test.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\OpenSSL\ES512;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class ES512Test extends TestCase
|
||||
{
|
||||
|
||||
public function setup()
|
||||
{
|
||||
// https://github.com/sebastianbergmann/phpunit/issues/1356
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$this->markTestSkipped();
|
||||
}
|
||||
$this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.es512.key");
|
||||
$this->public = openssl_pkey_get_public(SSL_KEYS_PATH . "public.es512.key");
|
||||
$this->signer = new ES512;
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey));
|
||||
}
|
||||
|
||||
}
|
||||
19
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/HS256Test.php
vendored
Normal file
19
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/HS256Test.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\OpenSSL\HS256;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class HS256Test extends TestCase
|
||||
{
|
||||
public function testSigningAndVerificationWorkProperly()
|
||||
{
|
||||
$signer = new HS256;
|
||||
$signature = $signer->sign('aaa', 'foo');
|
||||
$this->assertEquals($signature, base64_decode('P2Pb8e2Ja4P4YnTZ3EF002RKpUpOnfjIy0uLNT0R1J0='));
|
||||
|
||||
$this->assertTrue($signer->verify('foo', $signature, 'aaa'));
|
||||
$this->assertFalse($signer->verify('bar', $signature, 'aaa'));
|
||||
}
|
||||
}
|
||||
20
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/HS384Test.php
vendored
Normal file
20
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/HS384Test.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\HS384;
|
||||
|
||||
class HS384Test extends TestCase
|
||||
{
|
||||
public function testSigningAndVerificationWorkProperly()
|
||||
{
|
||||
$signer = new HS384;
|
||||
$signature = $signer->sign('aaa', 'foo');
|
||||
|
||||
$this->assertEquals($signature, base64_decode('W6Cd7qZknNYIXOxTrpEWFFwfuX0e2j59hTH4kVFh5o+9rcnfNtphLg4V8YXfkXGF'));
|
||||
|
||||
$this->assertTrue($signer->verify('foo', $signature, 'aaa'));
|
||||
$this->assertFalse($signer->verify('bar', $signature, 'aaa'));
|
||||
}
|
||||
}
|
||||
20
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/HS512Test.php
vendored
Normal file
20
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/HS512Test.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\HS512;
|
||||
|
||||
class HS512Test extends TestCase
|
||||
{
|
||||
public function testSigningAndVerificationWorkProperly()
|
||||
{
|
||||
$signer = new HS512;
|
||||
$signature = $signer->sign('aaa', 'foo');
|
||||
|
||||
$this->assertEquals($signature, base64_decode('GysqRX8GoD6BCTrI5sJy1ptn9A7vbDlvFOnaAxO/t+BD8KVrVAUVcHMxgM68ZNxnUNkb7kNSq3YxkCV4pBvTjg=='));
|
||||
|
||||
$this->assertTrue($signer->verify('foo', $signature, 'aaa'));
|
||||
$this->assertFalse($signer->verify('bar', $signature, 'aaa'));
|
||||
}
|
||||
}
|
||||
41
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/KeyFormatTest.php
vendored
Normal file
41
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/KeyFormatTest.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\RS256;
|
||||
|
||||
class PublicKeyTest extends TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKeyResource = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", 'tests');
|
||||
$this->privateKeyString = "-----BEGIN PRIVATE KEY-----\nMIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAN91kQxBuaze3WjI\nCNjeR/HD8E3kDzp89+Lhtn3tMish4yQxhNl6BEkabuS3pUj3WDP6+AFjBVqA1j3f\nu8Wqu7hRJDPHOs2kCII+LhIqvqQTLx/nvNOUhW2DimKn0HuHnlwJODq0MHFJEq5R\nrJH+mFGsP9yMGz4MxA04E2RVbUJRAgMBAAECgYEAjrDrO3Fo2GvD5Jn/lER0mnxt\nIb/kvYt5WyaYutbRN1u/SKhaVeklfWzkrSZb5DkV2LOE1JXfoEgvBnms1O9OSJXw\nqDrFF7NDebw95g6JzI+SbkIHw0Cb+/E9K92FjvW3Bi8j9PKIa8c/dpwIAIirc/q8\nuhSTf4WoIOHSFbSaQPECQQD1Wi9vynJLI5lShOs0wPomZOwNrXa73Lj8ciZC4oPS\nt6tWjbLnLsP+vTSLUyEYeQGsjdbY+y5siJmAqnV/ShB9AkEA6Sgna9gQw4dXN0jB\nSjOZSjl4S2/H3wHatclrvlYfbJVU6GlIlqWGaUkdFvCuEr9iXJAY4zpEQ4P370EZ\ntsyVZQJBAOZu/X6RNSc9GBNYo0+4rzjAMLPn50wp0dPHogfPlt+hgVqZWx2l3o6y\nRVdVjA/gFqJp1Q+VWdS1tvYRIqmadkECQCVdqQuwgedEHmcewtNod42crjmwvWBx\nBKMTl6/WT4zwVb41eUujVWo0LHRLuCoK//GDqmloIh6L3MU8MqnIGb0CQFWcpD4/\nroCkMblk0hPoQPpyapJexc438x7XuEGFEhyxxauqC5R4YFKCf+KBS2gZgr4GSwBU\nQww+qZ3eRYM7faM=\n-----END PRIVATE KEY-----";
|
||||
$this->privateKeyFilePath = SSL_KEYS_PATH . 'private-ne.key';
|
||||
$this->publicKeyResource = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->publicKeyString = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfdZEMQbms3t1oyAjY3kfxw/BN\n5A86fPfi4bZ97TIrIeMkMYTZegRJGm7kt6VI91gz+vgBYwVagNY937vFqru4USQz\nxzrNpAiCPi4SKr6kEy8f57zTlIVtg4pip9B7h55cCTg6tDBxSRKuUayR/phRrD/c\njBs+DMQNOBNkVW1CUQIDAQAB\n-----END PUBLIC KEY-----";
|
||||
$this->publicKeyFilePath = SSL_KEYS_PATH . 'public-ne.key';
|
||||
$this->signer = new RS256;
|
||||
}
|
||||
|
||||
public function testStringKeyWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKeyString);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->publicKeyString, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->publicKeyString, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testFilePathKeyWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKeyFilePath);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->publicKeyFilePath, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->publicKeyFilePath, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testResourceKeyWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKeyResource);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->publicKeyResource, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->publicKeyResource, $encrypted, 'aaa'));
|
||||
}
|
||||
}
|
||||
24
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/NoneTest.php
vendored
Normal file
24
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/NoneTest.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\None;
|
||||
|
||||
class noneTest extends TestCase
|
||||
{
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$signer = new none;
|
||||
|
||||
$this->assertTrue($signer->verify('bar', '', 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$signer = new none;
|
||||
$signature = $signer->sign('aaa', 'foo');
|
||||
|
||||
$this->assertTrue($signature === '');
|
||||
}
|
||||
}
|
||||
28
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS256Test.php
vendored
Normal file
28
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS256Test.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\RS256;
|
||||
|
||||
class RS256Test extends TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", 'tests');
|
||||
$this->public = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->signer = new RS256;
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey));
|
||||
}
|
||||
}
|
||||
28
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS384Test.php
vendored
Normal file
28
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS384Test.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\RS384;
|
||||
|
||||
class RS384Test extends TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", 'tests');
|
||||
$this->public = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->signer = new RS384;
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey));
|
||||
}
|
||||
}
|
||||
28
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS512Test.php
vendored
Normal file
28
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS512Test.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\OpenSSL\Signer;
|
||||
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\Signer\OpenSSL\RS512;
|
||||
|
||||
class RS512Test extends TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", 'tests');
|
||||
$this->public = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->signer = new RS512;
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey));
|
||||
}
|
||||
}
|
||||
29
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/SecLib/RS256TEST.php
vendored
Normal file
29
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/SecLib/RS256TEST.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test\SecLib\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\SecLib\RS256;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class RS256Test extends TestCase {
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKey = file_get_contents(SSL_KEYS_PATH . "private.key");
|
||||
$this->public = file_get_contents(SSL_KEYS_PATH . "public.key");
|
||||
$this->password = 'tests';
|
||||
$this->signer = new RS256();
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey, $this->password);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey, $this->password));
|
||||
}
|
||||
|
||||
}
|
||||
29
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/SecLib/RS384Test.php
vendored
Normal file
29
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/SecLib/RS384Test.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Namshi\JOSE\Test\SecLib\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\SecLib\RS384;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class RS384Test extends TestCase {
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKey = file_get_contents(SSL_KEYS_PATH . "private.key");
|
||||
$this->public = file_get_contents(SSL_KEYS_PATH . "public.key");
|
||||
$this->password = 'tests';
|
||||
$this->signer = new RS384();
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey, $this->password);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey, $this->password));
|
||||
}
|
||||
}
|
||||
29
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/SecLib/RS512Test.php
vendored
Normal file
29
vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/SecLib/RS512Test.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Namshi\JOSE\Test\SecLib\Signer;
|
||||
|
||||
use Namshi\JOSE\Signer\SecLib\RS512;
|
||||
use \PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class RS512Test extends TestCase {
|
||||
public function setup()
|
||||
{
|
||||
$this->privateKey = file_get_contents(SSL_KEYS_PATH . "private.key");
|
||||
$this->public = file_get_contents(SSL_KEYS_PATH . "public.key");
|
||||
$this->password = 'tests';
|
||||
$this->signer = new RS512();
|
||||
}
|
||||
|
||||
public function testVerificationWorksProperly()
|
||||
{
|
||||
$encrypted = $this->signer->sign('aaa', $this->privateKey, $this->password);
|
||||
$this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
$this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa'));
|
||||
}
|
||||
|
||||
public function testSigningWorksProperly()
|
||||
{
|
||||
$this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey, $this->password));
|
||||
}
|
||||
}
|
||||
53
vendor/namshi/jose/tests/Namshi/JOSE/Test/SimpleJWSTest.php
vendored
Normal file
53
vendor/namshi/jose/tests/Namshi/JOSE/Test/SimpleJWSTest.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Namshi\JOSE\Test;
|
||||
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
use Namshi\JOSE\SimpleJWS;
|
||||
use DateTime;
|
||||
|
||||
class SimpleJWSTest extends TestCase
|
||||
{
|
||||
const SSL_KEY_PASSPHRASE = 'tests';
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$date = new DateTime('tomorrow');
|
||||
$data = array(
|
||||
'a' => 'b',
|
||||
'exp' => $date->format('U')
|
||||
);
|
||||
$this->jws = new SimpleJWS(array('alg' => 'RS256'));
|
||||
$this->jws->setPayload($data);
|
||||
}
|
||||
|
||||
public function testConstruction()
|
||||
{
|
||||
$this->assertSame($this->jws->getHeader(), array('alg' => 'RS256', 'typ' => 'JWS'));
|
||||
$this->assertRegExp('/^\d+$/', $this->jws->getPayload()['iat'], 'iat property has integer value (from construction)');
|
||||
}
|
||||
|
||||
public function testValidationOfAValidSimpleJWS()
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey);
|
||||
|
||||
$jws = SimpleJWS::load($this->jws->getTokenString());
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->assertTrue($jws->isValid($public_key, 'RS256'));
|
||||
}
|
||||
|
||||
public function testValidationOfInvalidSimpleJWS()
|
||||
{
|
||||
$date = new DateTime('yesterday');
|
||||
$this->jws->setPayload(array(
|
||||
'exp' => $date->format('U')
|
||||
));
|
||||
$privateKey = openssl_pkey_get_private(SSL_KEYS_PATH . "private.key", self::SSL_KEY_PASSPHRASE);
|
||||
$this->jws->sign($privateKey);
|
||||
|
||||
$jws = SimpleJWS::load($this->jws->getTokenString());
|
||||
$public_key = openssl_pkey_get_public(SSL_KEYS_PATH . "public.key");
|
||||
$this->assertFalse($jws->isValid($public_key, 'RS256'));
|
||||
}
|
||||
}
|
||||
7
vendor/namshi/jose/tests/bootstrap.php
vendored
Normal file
7
vendor/namshi/jose/tests/bootstrap.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$loader = require __DIR__ . '/../vendor/autoload.php';
|
||||
$loader->add("Namshi\\JOSE\\Test", __DIR__);
|
||||
|
||||
define('TEST_DIR', __DIR__);
|
||||
define('SSL_KEYS_PATH', "file://" . TEST_DIR . DIRECTORY_SEPARATOR);
|
||||
16
vendor/namshi/jose/tests/private-ne.key
vendored
Normal file
16
vendor/namshi/jose/tests/private-ne.key
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAN91kQxBuaze3WjI
|
||||
CNjeR/HD8E3kDzp89+Lhtn3tMish4yQxhNl6BEkabuS3pUj3WDP6+AFjBVqA1j3f
|
||||
u8Wqu7hRJDPHOs2kCII+LhIqvqQTLx/nvNOUhW2DimKn0HuHnlwJODq0MHFJEq5R
|
||||
rJH+mFGsP9yMGz4MxA04E2RVbUJRAgMBAAECgYEAjrDrO3Fo2GvD5Jn/lER0mnxt
|
||||
Ib/kvYt5WyaYutbRN1u/SKhaVeklfWzkrSZb5DkV2LOE1JXfoEgvBnms1O9OSJXw
|
||||
qDrFF7NDebw95g6JzI+SbkIHw0Cb+/E9K92FjvW3Bi8j9PKIa8c/dpwIAIirc/q8
|
||||
uhSTf4WoIOHSFbSaQPECQQD1Wi9vynJLI5lShOs0wPomZOwNrXa73Lj8ciZC4oPS
|
||||
t6tWjbLnLsP+vTSLUyEYeQGsjdbY+y5siJmAqnV/ShB9AkEA6Sgna9gQw4dXN0jB
|
||||
SjOZSjl4S2/H3wHatclrvlYfbJVU6GlIlqWGaUkdFvCuEr9iXJAY4zpEQ4P370EZ
|
||||
tsyVZQJBAOZu/X6RNSc9GBNYo0+4rzjAMLPn50wp0dPHogfPlt+hgVqZWx2l3o6y
|
||||
RVdVjA/gFqJp1Q+VWdS1tvYRIqmadkECQCVdqQuwgedEHmcewtNod42crjmwvWBx
|
||||
BKMTl6/WT4zwVb41eUujVWo0LHRLuCoK//GDqmloIh6L3MU8MqnIGb0CQFWcpD4/
|
||||
roCkMblk0hPoQPpyapJexc438x7XuEGFEhyxxauqC5R4YFKCf+KBS2gZgr4GSwBU
|
||||
Qww+qZ3eRYM7faM=
|
||||
-----END PRIVATE KEY-----
|
||||
5
vendor/namshi/jose/tests/private.es256.key
vendored
Normal file
5
vendor/namshi/jose/tests/private.es256.key
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHcCAQEEIKv1ZMzZ8Uxt/YxwdKpMAP0nlV7ne8gh0+5G+5Gb/tMUoAoGCCqGSM49
|
||||
AwEHoUQDQgAEvuYsP+QnrqAbM7Iyhzjt08hFSuzapyojCB/gFsBt65Wir4TYr5fS
|
||||
Q96oa4qeGVeTFzl+fGiZFILootvLsiPwAQ==
|
||||
-----END EC PRIVATE KEY-----
|
||||
6
vendor/namshi/jose/tests/private.es384.key
vendored
Normal file
6
vendor/namshi/jose/tests/private.es384.key
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MIGkAgEBBDClxJJett5kQ5oEizsjCpxT0z844zzVeFm44egaCZL/Y90QLBx1BxfO
|
||||
/tbz6VgvRyugBwYFK4EEACKhZANiAATp/5dmyDZO+fQSgRqlD7KUxg22ybwI9/Rx
|
||||
vwcjYSR9j0Gqm3dAzPCUzuZWwVGZoxlvyc6dHCamYSe8DZTzJ1L51uc+/tvBiX6r
|
||||
Wo16HxamOivdU75FO3hx7Q+fbmgYZZQ=
|
||||
-----END EC PRIVATE KEY-----
|
||||
7
vendor/namshi/jose/tests/private.es512.key
vendored
Normal file
7
vendor/namshi/jose/tests/private.es512.key
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MIHbAgEBBEEWnooUpGIch1H/s8/ZUrHPo6RL+mHKhCrDO/Yjz37zM/tBJyvHmvwY
|
||||
Utw3mYII0m3es3dIiAjheghBs14+UCPq8aAHBgUrgQQAI6GBiQOBhgAEAVpvo7TG
|
||||
pQk5P7ZLo0qkBpaT+fFDv6HQrWElBKMxcrJd/mRNapweATsVv83YON4lTIIRXzgG
|
||||
kmWeqbDr6RQO+1cSAIs+MoRmLaiPyG2xmPwQCHX2CGX/uCZiT3iOxTAJEZuUbeSA
|
||||
828K4WfAA4ODdGiB87YVShhPOkiQswV3LpbpPGhC
|
||||
-----END EC PRIVATE KEY-----
|
||||
30
vendor/namshi/jose/tests/private.key
vendored
Normal file
30
vendor/namshi/jose/tests/private.key
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: AES-256-CBC,510C9E7AAF17A8397C4B79D906DAE432
|
||||
|
||||
W0qO1iOiS10gdomVUBbR3LdJOHRmfOmsXAjg4ezG3+Dg/0rfVkj+H3RWIpNnLq2l
|
||||
ciayAqjFzLzlKYPW4/XakyhfmCrZE+mL+kFVEUjhISZ+xXLwHGltL0UeYsei/AUp
|
||||
usjbxO8K0hZ1ZG2bQCEj5ff2YGmC9g1K3C7tE8XR0+QCZ/xaYkdUxDUIfYZ4MebG
|
||||
+C5P+mckds6lmcdZkIZj9H+36LPH2RPlMJAdLmLGytKF37h93gcL/pgePMEY+sVj
|
||||
h0YfScQ2GlE3v3S1CC1X2yjU5CtfxPHuA+2XuFIZ9twlrNFSqUWtvaCMNgSaWPLH
|
||||
KdR9RC8vImz0PEu6eR4t9ytTnykYG+mujCjumeohJoWjrXJymC4ocHIa8p/EA7Hc
|
||||
AWXxVlS897feG1BQ+rAiuvzIDvU8glKO8ZDjs9FUeC4O6ySCI9b4Of/57Uqo7nmQ
|
||||
0nLTJntvKFeusJ9WnergOEEHg1x93n8ajM49a+eS2uEj+UlIWiT01WTVS2i5wWp7
|
||||
+wcniYwlEk36HHBWSYBmhK+Uda4isE3SBBiRBa4ETh7Goor3FcxTA5TEqKwsHG0o
|
||||
1infKNmPHUy2hQTrGttoJrCpAvKq2RuQJUG5Tu5mURibihcRqCCcbyz/uKY/IIJg
|
||||
9WV3gzsDXrmr2UWovD9Rfudm6mdkhz1Sn+XS69z3irMJHuW/j2sO/bO5JseurPq7
|
||||
0V9Ms2TCIlyT7ncjsV3Lf0PSmitf/W4KzRKgxKkgORHNWX4W9yLA+yMeP3CfwaBn
|
||||
QiTk/dnN/uwVFQ5YlRkUsWOFxS7/gk/kBv15dTZV/1paqm0iPcExmtXqFvPlxnUr
|
||||
J3NeVl6j6kOUGLPsijk4zIijVMquYug4WfjCHLmzsqEGOYoK+nA6BQwxeMSOxFWT
|
||||
R8QWvvz8B6fm5BigBsUs7kQa3HcksE6YMz8dXr3r0cvINurGUpd3hDYLMdUJ0ttG
|
||||
cjdHXG3+fBOhUD8zkQSpf21V1/B4df2PiFlTKar5Jx1IiplvkTDPv6Nea8zuiVzy
|
||||
8Wp/PawNbPRs+KQAsr+pvged+VftvsVVGyG+0lXd7kPAJqxo4xEpD+NelHJKDgVy
|
||||
uuQPMoxt1TIvCAP9jD+ENCmnGU2HhpJvngsVQs+7DviCOgbbdIfff91fyrLkSNkb
|
||||
tck4q3RFpKDcKiU9yxjeAaYP6bXSq2ypwHV4YhivftyJN52TxAjGRqkuZCr5cG9P
|
||||
+l3hgwTusJSjiNFkjSv7Tq3sq+s6p3+vdqBs7pS6wH/yfnJtSnPgdOkO9NqvYG67
|
||||
ALco0hSuBmKWFjr4rk9e/fVPqOFCKZNdJ44ZFViFkF1Ry/YO7XvnxCQCOk17g/aM
|
||||
daMSNDJdZliGsu6lHxzF0/gq7ukTqAYJEh0Jvb7+l8/YMJZRFzxB0SENCTn9rPIY
|
||||
VTrajK8z33GMHUFzbGEyoZoGxNe0F4DarHqFteBjnRLFev0N88go0hlLP0NR2hBB
|
||||
RsNRTJGbzYTVZJwZTDrA11KoU3PaWFrZglsD/ExVb+OYgYv+SlbUdu9znpZBlayj
|
||||
3wJv6RqhDntrbc2yPzK/27KzToNLlqdBnUO0kl64JaZukkhpDfmKJahWO4nePxvu
|
||||
-----END RSA PRIVATE KEY-----
|
||||
6
vendor/namshi/jose/tests/public-ne.key
vendored
Normal file
6
vendor/namshi/jose/tests/public-ne.key
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfdZEMQbms3t1oyAjY3kfxw/BN
|
||||
5A86fPfi4bZ97TIrIeMkMYTZegRJGm7kt6VI91gz+vgBYwVagNY937vFqru4USQz
|
||||
xzrNpAiCPi4SKr6kEy8f57zTlIVtg4pip9B7h55cCTg6tDBxSRKuUayR/phRrD/c
|
||||
jBs+DMQNOBNkVW1CUQIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
4
vendor/namshi/jose/tests/public.es256.key
vendored
Normal file
4
vendor/namshi/jose/tests/public.es256.key
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEvuYsP+QnrqAbM7Iyhzjt08hFSuza
|
||||
pyojCB/gFsBt65Wir4TYr5fSQ96oa4qeGVeTFzl+fGiZFILootvLsiPwAQ==
|
||||
-----END PUBLIC KEY-----
|
||||
5
vendor/namshi/jose/tests/public.es384.key
vendored
Normal file
5
vendor/namshi/jose/tests/public.es384.key
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE6f+XZsg2Tvn0EoEapQ+ylMYNtsm8CPf0
|
||||
cb8HI2EkfY9Bqpt3QMzwlM7mVsFRmaMZb8nOnRwmpmEnvA2U8ydS+dbnPv7bwYl+
|
||||
q1qNeh8Wpjor3VO+RTt4ce0Pn25oGGWU
|
||||
-----END PUBLIC KEY-----
|
||||
6
vendor/namshi/jose/tests/public.es512.key
vendored
Normal file
6
vendor/namshi/jose/tests/public.es512.key
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBWm+jtMalCTk/tkujSqQGlpP58UO/
|
||||
odCtYSUEozFysl3+ZE1qnB4BOxW/zdg43iVMghFfOAaSZZ6psOvpFA77VxIAiz4y
|
||||
hGYtqI/IbbGY/BAIdfYIZf+4JmJPeI7FMAkRm5Rt5IDzbwrhZ8ADg4N0aIHzthVK
|
||||
GE86SJCzBXculuk8aEI=
|
||||
-----END PUBLIC KEY-----
|
||||
9
vendor/namshi/jose/tests/public.key
vendored
Normal file
9
vendor/namshi/jose/tests/public.key
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtpS1ZmfVKVP5KofIhMBP
|
||||
0tSWc4qlh6fm2lrZSkuKxUjEaWjzZSzs72gEIGxraWusMdoRuV54xsWRyf5KeZT0
|
||||
S+I5Prle3Idi3gICiO4NwvMk6JwSBcJWwmSLFEKyUSnB2CtfiGc0/5rQCpcEt/Dn
|
||||
5iM+BNn7fqpoLIbks8rXKUIj8+qMVqkTXsEKeKinE23t1ykMldsNaaOH+hvGti5J
|
||||
t2DMnH1JjoXdDXfxvSP/0gjUYb0ektudYFXoA6wekmQyJeImvgx4Myz1I4iHtkY/
|
||||
Cp7J4Mn1ejZ6HNmyvoTE/4OuY1uCeYv4UyXFc1s1uUyYtj4z57qsHGsS4dQ3A2MJ
|
||||
swIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
Reference in New Issue
Block a user