OpenSSL integration

php.internals

Thomas J. Hruska

19 years ago
I want to access some of the more obscure OpenSSL functions (about 20) from PHP and would like to contribute what I need access to from OpenSSL in PHP back to the community. To that end, I've downloaded the source code for PHP 5.2.0 and started looking at the C source for the OpenSSL portion to how the functions are implemented. My dev platform is Windows and VS.NET 2003 (armed, of course, with Visual Assist X). Since this is my first contribution to any open source project (source code-wise), I will probably need some hand holding (e.g. help with CVS stuff, first build in my preferred dev environment (VC++ GUI), and properly using 'diff'/'patch' when I'm done). However, I am an expert C/C++ programmer, so there's not much to worry about there - but I do need to know where the official documentation is for functions like zend_parse_parameters() and what in the world TSRMLS_CC is (a macro, obviously, but what it is good for and its historical significance is usually lost in documentation). I think that's all I need to know. The rest I can handle on my own. And web links to the right portions of the manual (i.e. RTMs) are fine - I know how to read once I get the right page. Finding the page is the tricky part. (And I'm willing to document undocumented functions as I go along too).
-- Thomas Hruska CubicleSoft President Ph: 517-803-4197 http://www.CubicleSoft.com/

Marcus Börger

19 years ago
Hello Thomas, read all README.* files and the CODING_STANDARDS (php is very picky). For an introduction to writing extensions look here: http://talks.somabo.de There is also an artivel series from Sara Golemon somewhere on the Zend site and she also published a neat book on the topic. However PHP 5.2 is already released so you'd need to hope for 5.3 or develop for HEAD directly - generally we only accept new features for HEAD and eventually backport them. Besides that any help is always welcome! best regards marcus Wednesday, January 10, 2007, 6:01:15 PM, you wrote:
> I want to access some of the more obscure OpenSSL functions (about 20) > from PHP and would like to contribute what I need access to from OpenSSL > in PHP back to the community.
> To that end, I've downloaded the source code for PHP 5.2.0 and started > looking at the C source for the OpenSSL portion to how the functions are > implemented. My dev platform is Windows and VS.NET 2003 (armed, of > course, with Visual Assist X).
> Since this is my first contribution to any open source project (source > code-wise), I will probably need some hand holding (e.g. help with CVS > stuff, first build in my preferred dev environment (VC++ GUI), and > properly using 'diff'/'patch' when I'm done). However, I am an expert > C/C++ programmer, so there's not much to worry about there - but I do > need to know where the official documentation is for functions like > zend_parse_parameters() and what in the world TSRMLS_CC is (a macro, > obviously, but what it is good for and its historical significance is > usually lost in documentation).
> I think that's all I need to know. The rest I can handle on my own. > And web links to the right portions of the manual (i.e. RTMs) are fine - > I know how to read once I get the right page. Finding the page is the > tricky part.
> (And I'm willing to document undocumented functions as I go along too).
> -- > Thomas Hruska > CubicleSoft President > Ph: 517-803-4197
> http://www.CubicleSoft.com/
Best regards, Marcus

Wez Furlong

19 years ago
Hi Thomas, I think Marcus gave you all the right pointers. I just wanted to let you know that I have a pending patch for DH kex and some bignum functions, and that Pierre mentioned that he's been working on a few other bits recently. If you think that we'll be overlapping, we can try harder to either get stuff committed, or pass it on to you. I wrote a lot of more recent code in that extension, so if you have questions about it, feel free to ask. I have to warn you that I get quite busy and don't tend to check this gmail account when that happens; you'll have better results emailing me on wez@php.net. Welcome :) --Wez. On 1/10/07, Thomas J. Hruska <shinelight@shininglightpro.com> wrote:

Pierre Joye

19 years ago
Hi Thomas, Wez, On 1/13/07, Wez Furlong <kingwez@gmail.com> wrote:
> Hi Thomas, > > I think Marcus gave you all the right pointers. > I just wanted to let you know that I have a pending patch for DH kex > and some bignum functions, and that Pierre mentioned that he's been > working on a few other bits recently.
Yes, mostly a new API (more flexible and less global namespace invasions :). I also have a toy example implementing the BN API as objects (Wez, we can merge that later, non issue :). However, Wez and I imported openssl into PECL to avoid this exact problem. Holding PHP while we are working on the new stuff. If your changes bring an immediate gain, are consistent with the current API (yes, consistency is not the word I would use for the current openssl api but still ;), I see no reason not to integrate it. Please note that 5.2.x is now frozen, it will be in at least 5.3.0 or 6.x.
> If you think that we'll be overlapping, we can try harder to either > get stuff committed, or pass it on to you.
A good start would be to describe your work. We can then try to write down a roadmap and define some priorities. Cheers, --Pierre

Thomas J. Hruska

19 years ago
Pierre wrote:
> Hi Thomas, Wez, > > On 1/13/07, Wez Furlong <kingwez@gmail.com> wrote: >> Hi Thomas, >> >> I think Marcus gave you all the right pointers. >> I just wanted to let you know that I have a pending patch for DH kex >> and some bignum functions, and that Pierre mentioned that he's been >> working on a few other bits recently. > > Yes, mostly a new API (more flexible and less global namespace > invasions :). I also have a toy example implementing the BN API as > objects (Wez, we can merge that later, non issue :). > > However, Wez and I imported openssl into PECL to avoid this exact > problem. Holding PHP while we are working on the new stuff. If your > changes bring an immediate gain, are consistent with the current API > (yes, consistency is not the word I would use for the current openssl > api but still ;), I see no reason not to integrate it. Please note > that 5.2.x is now frozen, it will be in at least 5.3.0 or 6.x. > > >> If you think that we'll be overlapping, we can try harder to either >> get stuff committed, or pass it on to you. > > A good start would be to describe your work. We can then try to write > down a roadmap and define some priorities. > > Cheers, > --Pierre
What I'm working on is definitely not overlapping with your stuff. Specifically, I'm off in BIO, PKCS#7, and EVP land.
-- Thomas Hruska Shining Light Productions Home of BMP2AVI, Nuclear Vision, ProtoNova, and Win32 OpenSSL. http://www.slproweb.com/ Ask me about discounts on any Shining Light Productions product!