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

Verify public key #21

Open
ghost opened this issue May 12, 2014 · 0 comments
Open

Verify public key #21

ghost opened this issue May 12, 2014 · 0 comments

Comments

@ghost
Copy link

ghost commented May 12, 2014

In here why don't we just verify the public key before trying to use it?

        // When public key is invalid, openssl throws a
        // 'supplied key param cannot be coerced into a public key' warning
        // and phar ignores sig verification.
        // We need to protect from that by catching the warning

I think openssl_pkey_get_public($certificate) would do the job. So this is an input validation task, which should be in the setter and not in the processing code as some kind of workaround...

Btw why don't you send an issue about this feature. Maybe phar maintainers add it to the next release. (it is weird to talk about libs which haven't have maintenance for such a long time)

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

No branches or pull requests

0 participants