OpenSSL 1.1 pre-3 CRYPTO_set_mem_functions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSSL 1.1 pre-3 CRYPTO_set_mem_functions

Erik Forsberg-11

just started do the 1.1 updates needed in my own software, in the past I had
use the 1.0.2 memory allocation hooks to link into my own mem leak tester.

1.1 has reworked this, by what I read in the past, sounded like I could still
get value out of if, but today when I looked at CRYPTO_set_mem_functions()
I see they simply save function pointers into 3 static _wrapper variables.
You can read them by calling CRYPTO_get_mem_functions but thats all.
No other use of them at all in the file crypto/mem.c

Are we supposed to be able to hook into OPENSSL_malloc() etc in 1.1 ?
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 1.1 pre-3 CRYPTO_set_mem_functions

Richard Levitte - VMS Whacker-2
In message <[hidden email]> on Mon, 15 Feb 2016 15:15:28 -0800, "Erik Forsberg" <[hidden email]> said:

erik>
erik> just started do the 1.1 updates needed in my own software, in the past I had
erik> use the 1.0.2 memory allocation hooks to link into my own mem leak tester.
erik>
erik> 1.1 has reworked this, by what I read in the past, sounded like I could still
erik> get value out of if, but today when I looked at CRYPTO_set_mem_functions()
erik> I see they simply save function pointers into 3 static _wrapper variables.
erik> You can read them by calling CRYPTO_get_mem_functions but thats all.
erik> No other use of them at all in the file crypto/mem.c
erik>
erik> Are we supposed to be able to hook into OPENSSL_malloc() etc in 1.1 ?

You may have missed it, but there's a CRYPTO_set_mem_functions() as
well.  Can't you use that?

Cheers,
Richard

--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 1.1 pre-3 CRYPTO_set_mem_functions

Erik Forsberg-11
I was talking about CRYPTO_set_mem_functions()

It doesnt do anything, just saving some pointers that are never
used for anything. So a big NO-OP, seems like a TODO implementation ?

>-- Original Message --
>
>In message <[hidden email]> on Mon, 15 Feb 2016 15:15:28 -0800, "Erik Forsberg" <[hidden email]> said:
>
>erik>
>erik> just started do the 1.1 updates needed in my own software, in the past I had
>erik> use the 1.0.2 memory allocation hooks to link into my own mem leak tester.
>erik>
>erik> 1.1 has reworked this, by what I read in the past, sounded like I could still
>erik> get value out of if, but today when I looked at CRYPTO_set_mem_functions()
>erik> I see they simply save function pointers into 3 static _wrapper variables.
>erik> You can read them by calling CRYPTO_get_mem_functions but thats all.
>erik> No other use of them at all in the file crypto/mem.c
>erik>
>erik> Are we supposed to be able to hook into OPENSSL_malloc() etc in 1.1 ?
>
>You may have missed it, but there's a CRYPTO_set_mem_functions() as
>well.  Can't you use that?
>
>Cheers,
>Richard
>
>--
>Richard Levitte         [hidden email]
>OpenSSL Project         http://www.openssl.org/~levitte/
>
>--
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 1.1 pre-3 CRYPTO_set_mem_functions

Richard Levitte - VMS Whacker-2
You know, you're entirely right.  That's a flaw and needs correction.
Thanks for the notification.

Cheers,
Richard

In message <[hidden email]> on Mon, 15 Feb 2016 15:43:28 -0800, "Erik Forsberg" <[hidden email]> said:

erik> I was talking about CRYPTO_set_mem_functions()
erik>
erik> It doesnt do anything, just saving some pointers that are never
erik> used for anything. So a big NO-OP, seems like a TODO implementation ?
erik>
erik> >-- Original Message --
erik> >
erik> >In message <[hidden email]> on Mon, 15 Feb 2016 15:15:28 -0800, "Erik Forsberg" <[hidden email]> said:
erik> >
erik> >erik>
erik> >erik> just started do the 1.1 updates needed in my own software, in the past I had
erik> >erik> use the 1.0.2 memory allocation hooks to link into my own mem leak tester.
erik> >erik>
erik> >erik> 1.1 has reworked this, by what I read in the past, sounded like I could still
erik> >erik> get value out of if, but today when I looked at CRYPTO_set_mem_functions()
erik> >erik> I see they simply save function pointers into 3 static _wrapper variables.
erik> >erik> You can read them by calling CRYPTO_get_mem_functions but thats all.
erik> >erik> No other use of them at all in the file crypto/mem.c
erik> >erik>
erik> >erik> Are we supposed to be able to hook into OPENSSL_malloc() etc in 1.1 ?
erik> >
erik> >You may have missed it, but there's a CRYPTO_set_mem_functions() as
erik> >well.  Can't you use that?
erik> >
erik> >Cheers,
erik> >Richard
erik> >
erik> >--
erik> >Richard Levitte         [hidden email]
erik> >OpenSSL Project         http://www.openssl.org/~levitte/
erik> >
erik> >--
erik> >openssl-dev mailing list
erik> >To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
erik>
erik> --
erik> openssl-dev mailing list
erik> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
erik>
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 1.1 pre-3 CRYPTO_set_mem_functions

Salz, Rich

> You know, you're entirely right.  That's a flaw and needs correction.
> Thanks for the notification.

Yes, the macro's in crypto.h should call through the function pointers.

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev