Skip to content

Commit

Permalink
Feature: Add reals EC keys for ES alg testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Aug 1, 2020
1 parent 43b7aec commit 9f51a5a
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/JWTTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,24 +257,24 @@ public function getEncodeToDecodeDataProvider()
],
// ES
[
file_get_contents(__DIR__ . '/assets/rs256.key'),
file_get_contents(__DIR__ . '/assets/rs256.key.pub'),
file_get_contents(__DIR__ . '/assets/es256.pem'),
file_get_contents(__DIR__ . '/assets/es256.pub'),
'ES256',
[],
new EncodeOptions(),
new DecodeOptions(['ES256']),
],
[
file_get_contents(__DIR__ . '/assets/rs384.key'),
file_get_contents(__DIR__ . '/assets/rs384.key.pub'),
file_get_contents(__DIR__ . '/assets/es384.pem'),
file_get_contents(__DIR__ . '/assets/es384.pub'),
'ES384',
[],
new EncodeOptions(),
new DecodeOptions(['ES384']),
],
[
file_get_contents(__DIR__ . '/assets/rs512.key'),
file_get_contents(__DIR__ . '/assets/rs512.key.pub'),
file_get_contents(__DIR__ . '/assets/es512.pem'),
file_get_contents(__DIR__ . '/assets/es512.pub'),
'ES512',
[],
new EncodeOptions(),
Expand Down
5 changes: 5 additions & 0 deletions tests/assets/es256.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIMwAtO3mi/H6q3pq7aCMIGMg5b86kMmUwprLg4nJ9cjmoAoGCCqGSM49
AwEHoUQDQgAEdn06UBcGSe6uVvrw2CW3XXs6OUIk3ShXL0L3t37RT49Nack3PpFB
MvyDPjSKmb1W16za1R3oz21wFNoM3kWJNg==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions tests/assets/es256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdn06UBcGSe6uVvrw2CW3XXs6OUIk
3ShXL0L3t37RT49Nack3PpFBMvyDPjSKmb1W16za1R3oz21wFNoM3kWJNg==
-----END PUBLIC KEY-----
6 changes: 6 additions & 0 deletions tests/assets/es384.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDBn7Ij4P5wHIC8UTTgKnkcciTrQIld7Us3bCdsfZXqtdjMgEdiP+0dq
ee6/0JGqhbegBwYFK4EEACKhZANiAATBcTKyDFd1/Med+V+1JxwJM4tUcJWFeDK3
Wxrgf/hu2Zm8BWh6yezMFw4antPu6YEFD5ocpWkjIMhsK0LU/avK0dJ1Atr1JcHf
6xA1D4RikTCCrwxfAGOapDKk9Zv/UBM=
-----END EC PRIVATE KEY-----
5 changes: 5 additions & 0 deletions tests/assets/es384.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEwXEysgxXdfzHnflftSccCTOLVHCVhXgy
t1sa4H/4btmZvAVoesnszBcOGp7T7umBBQ+aHKVpIyDIbCtC1P2rytHSdQLa9SXB
3+sQNQ+EYpEwgq8MXwBjmqQypPWb/1AT
-----END PUBLIC KEY-----
7 changes: 7 additions & 0 deletions tests/assets/es512.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN EC PRIVATE KEY-----
MIHbAgEBBEF8qqEjpnCtY53yxaCW1ZLVzUX9/hEGM8q2/c22fsGzrVZBoW2mUD1s
oY4TNRic89z8tRvS8uQTfgmpcee/4XWD7qAHBgUrgQQAI6GBiQOBhgAEALcqrq5+
HKE6ZtpNuwsVgkpIbXocBmsQB7ISgHQWuW0Whw0npWF1IeBbElrB2xyJIiAmX+Lo
0ISJUQqQ73VlAUk4AYEyzW3rg4pBqIROiMrYLcoZuV3CPdUz5y2C9p01lAXHSdsC
AD16lYjfEougnjmzuUPIMu31o91znQW5C5BM75By
-----END EC PRIVATE KEY-----
6 changes: 6 additions & 0 deletions tests/assets/es512.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN PUBLIC KEY-----
MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAtyqurn4coTpm2k27CxWCSkhtehwG
axAHshKAdBa5bRaHDSelYXUh4FsSWsHbHIkiICZf4ujQhIlRCpDvdWUBSTgBgTLN
beuDikGohE6Iytgtyhm5XcI91TPnLYL2nTWUBcdJ2wIAPXqViN8Si6CeObO5Q8gy
7fWj3XOdBbkLkEzvkHI=
-----END PUBLIC KEY-----

0 comments on commit 9f51a5a

Please sign in to comment.