[nycphp-talk] Working with openssl
Michael Southwell
michael.southwell at nyphp.org
Thu Aug 17 14:22:08 EDT 2006
There were some mistakes on pages 95, 96, and 98, described in the
errata at http://apress.com/book/errataDisplay.html?bID=437&sID=3419.
Chris tells me that you do have updated code, however, so the
previous is more in the nature of a general reminder to everybody
than a possible solution for you, alas.
At 01:20 PM 8/17/2006, you wrote:
> >>
> >>OpenSSL Demo
> >>http://www.smith.edu/admission/openSSL/openSSLdemo.php
> >>Form testing page (passphrase is 'Encryption is fun for everyone')
> >>http://www.smith.edu/admission/openSSL/openSSLtest.php
> >>
> >>Here is the actual code:
> >>OpenSSL class
> >>http://www.smith.edu/admission/openSSL/openSSLCode.php
> >>Demo code
> >>http://www.smith.edu/admission/openSSL/openSSLdemoCode.php
> >>Form page for testing
> >>http://www.smith.edu/admission/openSSL/openSSLtestCode.php
> >>
>csnyder wrote:
> > Hi Aaron --
> >
> > Nothing jumps out immediately, but to help debug the problem you
> > should probably try with an unecrypted private key at first.
> > openssl_get_privatekey() returns that invalid key error if it can't
> > decypt the key for some reason.
> >
>
>
>Hi Chris,
>
>I removed passphrase from the demo class calls and the test form. Upon
>testing it produced the same error:
>
>Warning: openssl_private_decrypt() [function.openssl-private-decrypt]:
>key parameter is not a valid private key in
>/home/a/adm1a/openSSL/openSSL.php on line 119
>
>Warning: openssl_free_key() expects parameter 1 to be resource, null
>given in /home/a/adm1a/openSSL/openSSL.php on line 122
>Testing OpenSSL
>
>It doesn't like my key, I'm not sure why. This time around I ran the
>key and encrypted text through a text editor before entering in the form
>to make sure there weren't any invisible characters it was picking up.
>Hmmmm.
>
>-Aaron
>_______________________________________________
>New York PHP Community Talk Mailing List
>http://lists.nyphp.org/mailman/listinfo/talk
>
>NYPHPCon 2006 Presentations Online
>http://www.nyphpcon.com
>
>Show Your Participation in New York PHP
>http://www.nyphp.org/show_participation.php
Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses
More information about the talk
mailing list