Print

Print


Follow-up Comment #24, bug #97585 (project xrootd):


  Hi Lukasz,

  The problem to solve was to have the full RSA key available in memory.
There is no advised way to do this and no documented single call; what I did
was to extract the public key from the certificate already in memory and
complete it with a call to  PEM_read_PrivateKey; for this I was passing the
address of the pointer to the key as second argument, in such a way that the
key could be completed.
This worked fine so far and still works on any system except the version
available on SL(C)6.

By re-analyzing the problem for the Nth time I have realized that the
equivalent call to PEM_read_bio_X509 (with the pointer to the certificate as
second argument) is deprecated because 'some versions of OpenSSL will not
correctly reuse an existing structure'; this brought me to think that maybe
the same is true also for PEM_read_PrivateKey.
But then, how to complete the key? By googling a bit further I have found
that PEM_read_PrivateKey, though not documented, when asked to create the key
structure, it fills it completely, so one can use the alternative way to call
this function. 

So I've tried this way and everything seems to work smoothly; my local tests
were fine, and now I am eager to see what happens with large scale tests.

  Gerri


    _______________________________________________________

Reply to this item at:

  <http://savannah.cern.ch/bugs/?97585>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1