Hi, everyone,
-- Here is my code ---
... ...
unsigned char *ddd;
char* mmm;
int y, z;
z = i2d_RSAPrivateKey(rsa, NULL);
mmm = Malloc(z);
ddd = (unsigned char *)mmm;
z = i2d_RSAPrivateKey(rsa, &ddd);
printf("unsigned char XXX_rsaprivkey[%d] = {\n", z);
for (y=0; y<z; y++) {
printf("0x%02X, ", ddd[y]);
if ((y & 0x0f) == 0x0f) printf("\n");
}
if (y%16 != 0) printf("\n");
printf("};\n");
Free(mmm);
... ...
--- The out put looks like OK. Then I call ---
intErr = SSL_CTX_use_certificate_ASN1(ssl_ctx, 523, XXX_certificate);
if (intErr <= 0) {
return "error certificate asn1";
}
intErr = SSL_CTX_use_RSAPrivateKey_ASN1(ssl_ctx, XXX_rsaprivkey, 317);
if (intErr <= 0) {
return "error rsakey asn1";
}
--- It gives me "error rsakey asn1" ---
I don't know what's wrong, could anyone give me a little bit hints?
Thank you so much!
Sincerely, ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
~~~~~~~~ UTER
Xiaofei Diao ~~~~~~~~~~~~~ MP
~~~~~~~~~~~~~~~~~~~~~ I Like CO
http://www.tc.umn.edu/~diao0003/
+-------------------------------------------------------------------------+
| Administrative requests should be sent to [EMAIL PROTECTED] |
| List service provided by Open Software Associates, http://www.osa.com/ |
+-------------------------------------------------------------------------+