Hello Everyone,

I am new to RSA/SHA1 & need some help from your side !

We have a client application on windows & I am in process to port that on
Mac. I am facing some problems with the RSA/SHA1 authentication on Mac.

Windows logic:
On windows side we have a client key file "cspkb.dat" which we are using for
authentication. Server sends a string (size 28 bytes in base64) & we first
decode that string & then sign it using the key present in the cspkb.dat
file, encode it & send that back to the server for authentication. We are
using RSA/SHA1 mechanism for this signing purpose.


Problem:
For Mac also I am using the same key file (just copied it to Mac, as i want
to use the same mechanism on both the platforms) & but on Mac i am not able
to read the key out of this file. I have tried using

      privateKey = PEM_read_PrivateKey(file, NULL, NULL, NULL);

but this returns error : error:0906D06C:lib(9):func(109):reason(108)

On searching the openssl list I got a mail thread which tells to use
PEM_read_X509 :

        X509 *x509 = PEM_read_X509(file, NULL, NULL, NULL);

but this is also not working for me.

Can anyone help me out on this ? Am I doing something wrong here ? any
help/pointers are highly appriciated.

Thanks a lot in advance .
Cheers!

Reply via email to