On Thu January 24 2008 14:42, OpenSSL wrote:
> Thanks, but as I said, I cannot simply provide my own linkable versions 
> of fopen, fread, etc. These functions are reserved by the system for 
> other uses.
> 

Sure you can.  At least you can if the loader of your tool-chain you are using
supports partial linking (two or more *.o in -> one *.o out).
This "pre-link" run is done without any of your system libraries visible to
the loader.  Once the standard fopen, fread, etc symbols have been resolved 
(suppressed) you should be good to go.

Just make an additional loader run with your custom wrapper and the
library(ies) for which you need to intercept the standard symbols.

If you where to actually name the tool chain components you are using (name and 
version),
someone might in return be nice enough to give you specific directions/options.
Otherwise, your stuck with RTFM for your tool-chain.

Mike

> Is there no way to cleanly override IO in OpenSSL?
> 
> Thanks.
> 
> 
> 
> > On Thu January 24 2008 13:03, OpenSSL wrote:
> >   
> >> How might I make OpenSSL use my own 'file system' instead of fopen, 
> >> fread, etc.?
> >>     
> >
> > The usual way to do that is to write a small bit of wrapper code that
> > resolves the fopen, fread, etc calls - and re-issues them as whatever
> > your system requires.
> >
> > Then just specify your wrapper *.o to the linker (or do a partial link)
> > so it is found by the linker before your system libraries.
> >
> > You will be able to use that pre-linked *.o for anything "C".
> > Mike
> >   
> >> I need to make OpenSSL work on a system without implementations of 
> >> fopen, fread, etc. However, I have access to functionality that is 
> >> essentially the same as fopen, fread, etc. I see BIO_FLAGS_UPLINK but am 
> >> not finding any description of it that might help me tell if it could be 
> >> useful. I cannot simply provide my own linkable versions of fopen, 
> >> fread, etc. as that would collide with other libraries I have to 
> >> interoperate with. Another possibility might be to somehow take 
> >> advantage of OPENSSL_NO_FP_API, but I can't easily tell how to 
> >> accomplish that. A final fallback would be to somehow hack OpenSSL, but 
> >> I'd rather avoid that.
> >>
> >> Thanks.
> >>     
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [email protected]
> Automated List Manager                           [EMAIL PROTECTED]
> 
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to