forked from vuvanly/ebics
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
leading zeros of public exponent need to be dropped for digest
- Loading branch information
1 parent
d8f2eb2
commit b967280
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJGUjEOMAwGA1UEBxMF | ||
UGFyaXMxEzARBgNVBAoTCkUuQi5JLkMuUy4xCTAHBgNVBAsTADEPMA0GA1UEAxMGRS4gQml4MB4X | ||
DTA5MDcyNzA5MDYxNVoXDTE0MDcyNzA5MDYxNVowTjELMAkGA1UEBhMCRlIxDjAMBgNVBAcTBVBh | ||
cmlzMRMwEQYDVQQKEwpFLkIuSS5DLlMuMQkwBwYDVQQLEwAxDzANBgNVBAMTBkUuIEJpeDCCASIw | ||
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANeOaO2fHl56a7bcS4FAnfTyvGiibmiyed9Jx1wi | ||
fCojuzzLpnSVWnbDm2wyB1/YXK1V/cllK+LCrav48xMnoga0aRcVxrSCtpAW+PB6Wn1hKkNW2m/w | ||
IuP1Vg+LB2EAsAVvCiMrCpyGKUUGNQ5x0Ph913xYUgZ41Rq/CNJ2w4AtuCgbr5KvRTwvKEv4JEJ5 | ||
qymedq3Yy1kt6t5HbQkLzMpMOBtMLzUBiZUv1sTApEtK39CdCI8GAEsZdW5ePSdr77y0qsA7QCTx | ||
WliLpNDBx4BOuYJz9IdejqtNT4zAD7sQB6Yai54LzJ0lpHmA3baK3/Y3gBJqxC3WHSBf68x66icC | ||
AwEAAaMpMCcwCwYDVR0PBAQDAgZAMAoGA1UdDgQDBAExMAwGA1UdIwQFMAOAATEwDQYJKoZIhvcN | ||
AQELBQADggEBALo97IHqI3SfAS7rcTRGykCxqImtaDKJ3c77iKaUBIfJtBWuSxMLbLyC5xG5WQmS | ||
/IdjSLp8WWetDylP2mkKvqk601UJGYHTnvUHblVY9MhG5kD6LB6bfjp6PfOm1629Mlmg5BCZ7cO1 | ||
+pEbQK2IE1MTreCYPiQyJJeT6umUKfeRgS3WFWCya/zfaLlCZDrRy+N8TVFKauMMKa8AugUn9eAm | ||
7CuKgt89RkH3ERhJUZWb5Rbo6ykvHzbpDjaCedtnobUURjKeiwNR8cM5Tt8yeH4fOh63vbYZWUBv | ||
3jQ5URJX2vHgkOP6sNB/E7/yqYPLxhj3E7Ty2d4/ru3yjJfRiVE= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'minitest/autorun' | ||
require_relative '../lib/ebics' | ||
|
||
class SchemaTest < Minitest::Test | ||
def setup | ||
@user = EBICS::User.new do |key| | ||
key.rsa = OpenSSL::X509::Certificate.new File.read('keys/example.cer') | ||
end | ||
|
||
@example_key = @user.key('example') | ||
end | ||
|
||
def test_key_digest | ||
assert_equal @example_key.public_exponent, 'AQAB' | ||
assert_equal @example_key.public_sha_256.upcase, "F5ACB7B5CF88DCC80905AAE8783ED725F3AD1DCABB211DB77E58D679F9747739" | ||
end | ||
|
||
def test_public_modulus | ||
assert_equal Base64.strict_decode64(@example_key.public_modulus), 'D78E68ED9F1E5E7A6BB6DC4B81409DF4F2BC68A26E68B279DF49C75C227C2A23BB3CCBA674955A76C39B6C32075FD85CAD55FDC9652BE2C2ADABF8F31327A206B4691715C6B482B69016F8F07A5A7D612A4356DA6FF022E3F5560F8B076100B0056F0A232B0A9C86294506350E71D0F87DD77C58520678D51ABF08D276C3802DB8281BAF92AF453C2F284BF8244279AB299E76ADD8CB592DEADE476D090BCCCA4C381B4C2F350189952FD6C4C0A44B4ADFD09D088F06004B19756E5E3D276BEFBCB4AAC03B4024F15A588BA4D0C1C7804EB98273F4875E8EAB4D4F8CC00FBB1007A61A8B9E0BCC9D25A47980DDB68ADFF63780126AC42DD61D205FEBCC7AEA27' | ||
end | ||
end |