On Apr 13, 12:27 am, Nikolay Elenkov <nikolay.elen...@gmail.com>
wrote:
> On Wed, Apr 13, 2011 at 3:44 PM, Nate Totura <ntot...@gmail.com> wrote:
>
> > I am trying to do signature validation on a server instead of in the
> > app iteself. I would ideally like to use the php openssl libraries and
> > it looks like code such as the following should work:
> ...
>
> > My problem is that I can not get this PHP code to successfully verify
> > the data/signature and I do not know what needs to change to get it to
> > work correctly.
>
> > If I use openssl, create a private and public key, create a signature
> > for the same data using sha1 and run it through the above php code, it
> > works fine and validate successfully.
>
> What format is the $signature openssl_sign() outputs? Try to print it.
> My guess is that it's binary, whereas the signature you get from
> Market is Base64-encoded. If so, you need to decode the Base64
> and it should work.

Thanks, the openssl_sign() php function is just being used to verify
that if I sign something myself, instead of using the Google returned
version, that it works in my php verification code. The openssl_sign()
does return binary and I am encoding it to base64 before using it
elsewhere.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to