El vie, 01 de dic de 2000, a las 18:27, Rafa Marín López escribió:
> Hello.
> 
> 
> I have a problem with this situation:
> 
> I have this code in function A:
> 
> char keystr[1024];
> 
> 
> ...
> RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
> 
> unsigned char *ptr;
>  int derlen
>  ptr=keystr;
> derlen=i2d_RSAPublicKey(rsa,&ptr);
> ptr=keystr;
> 
> In a function B:
> 
> 
>    unsigned char *ptr;
>   int len;
> 
>   ptr=keystr; //keystr is a param but its value is equal keystr in
> function A.
>   printCadena(KCtx->keystr,KCtx->derlen);
>   rsa=d2i_RSAPublicKey(NULL,&ptr,KCtx->derlen);
> 
> But I obtain a NULL  (rsa == NULL)
> 
> Why?
> 
> 
> Thank you
> 
0o---- Fin de mensaje original ----oO

  
  Creo que puede ser porque 

    d2i_RSAPublicKey como segundo parámetro necesita un char **puntero, y tú
   solo tienes un char *ptr.

   prueba a definirte otra variable y la iguales
  

   unsigned char datos [] = {0x30,0x82,0x02,0x5c,0x02,0x01,0x00,0x02,0x81,0x81};
   char *arraydatos[1] = {datos};
   ptr = array_datos[0]


  Salu2
    

-- 
------------------------------------------------------------------------ 
                   '''
                  (O O)                 Universidad Carlos III (Leganes)
        +---oOO----(_)-----------+      
        |  Ignacio Diaz Asenjo   |   = Proyecto de Investigación E-TICKET = 
        | [EMAIL PROTECTED]  |       Edificio Betancourt (1.1H29) 
        +------------------oOO---+            Tfno: (91)624-59-49
                |__|__|                         ICQ:32646959
                 || ||
                ooO Ooo
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to