Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X509: always base64-encode extensions for which _getMapping returns a bool #629

Merged
merged 4 commits into from Mar 5, 2015

Conversation

terrafrost
Copy link
Member

Same thing as #628 but against 1.0 instead.


$spkac = $x509->loadX509($test);

$this->assertEquals($a['tbsCertificate']['extensions'][8]['extnValue'], 'MDUwDgYIKoZIhvcNAwICAgCAMA4GCCqGSIb3DQMEAgIAgDAHBgUrDgMCBzAKBggqhkiG9w0DBw==');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swap arguments. $expected comes first.

@terrafrost
Copy link
Member Author

Replaces #628

Btw, I am still curious if it is possible to change the branch a PR is made against. Any ideas?

@bantu
Copy link
Member

bantu commented Mar 4, 2015

Btw, I am still curious if it is possible to change the branch a PR is made against. Any ideas?

Unfortunately it's not.

bantu added a commit to bantu/phpseclib that referenced this pull request Mar 4, 2015
…ensions-2

X509: always base64-encode extensions for which _getMapping returns a bool

* terrafrost/x509-unsupported-extensions-2:
  Tests/X509: fix unit test
  Tests/X509: add unit test for unsupported extension encoding
  X509: always base64-encode extensions for which _getMapping returns a bool

$cert = $x509->loadX509($test);

$this->assertEquals($cert['tbsCertificate']['extensions'][8]['extnValue'], 'MDUwDgYIKoZIhvcNAwICAgCAMA4GCCqGSIb3DQMEAgIAgDAHBgUrDgMCBzAKBggqhkiG9w0DBw==');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please swap the parameters. $expected comes first.

@terrafrost
Copy link
Member Author

The latest commit addresses your comment.

I'll do the unit test for #627 after this has been merged (rather than creating a second copy of X509Test.php that's pretty much guaranteed to have a merge conflict)

@bantu
Copy link
Member

bantu commented Mar 5, 2015

This looks good. The test fails without the patch. :-)

bantu added a commit that referenced this pull request Mar 5, 2015
X509: always base64-encode extensions for which _getMapping returns a bool

* terrafrost/x509-unsupported-extensions-2:
  Tests/X509: swap expected and actual value
  Tests/X509: fix unit test
  Tests/X509: add unit test for unsupported extension encoding
  X509: always base64-encode extensions for which _getMapping returns a bool
@bantu bantu merged commit 31e2308 into phpseclib:1.0 Mar 5, 2015
@bantu
Copy link
Member

bantu commented Mar 5, 2015

Changed class name on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants