Hello,
> I have tested the sample code and it runs without error however I am 
still
> using the default char N[], char E[] and msg[] values in the file.
> 
> I am unclear what steps I need to take to convert the Modulus and 
Exponent
> strings from my XML into a format suitable for this function. In the 
code it
> seems that the N and E values are hexadecimal- should this be the
> hexadecimal conversion of my 128 byte base64 decoded modulus value from 
the
> XML and the equivalent for the exponent?
I use hex form because BN_hex2bn() function is used here.
In your case, you may use binary buffer (after decoding with base64) and
function BN_bin2bn().
> 
> Also should the 'msg[]' character array be the pure xml string of the
> SignedInfo element?
msg[] is not used, this is from my other examples, ignore it.
You should put signature (after base64 decoding) to enc_bin buffer.
In my example I test only decryption by creating buffer with
all bytes set to 1:
       /* prepare "encrypted" data */
        enc_len = RSA_size(rsa_pub);
        memset(enc_bin, 1, enc_len);
In your situation, you should put real data here.

Best regards,
--
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to