Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Salz, Rich via openssl-users
➢So it's guaranteed for 1.1, mostly guaranteed for recent 1.0.2, but not guaranteed for older 1.0.2. yes. ➢ I also think it would be good to backport all to 1.0.2 Yes. I believe I did that, but I am not absolutely 100% positive. -- openssl-users mailing list To unsubscribe:

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Salz, Rich via openssl-users
➢ I think we fixed all such cases in 1.1.0, all *_free() functions should handle NULL. I don't think we backported to changes to 1.0.2. Yes, and we fixed the documentation. I backported all/most of them to 1.0.2 to make cherry-picking easier. I don’t know if I changed the docs.

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Kurt Roeckx
On Fri, Dec 22, 2017 at 09:30:19AM -0500, Ken Goldman wrote: > On 12/22/2017 9:24 AM, Salz, Rich via openssl-users wrote: > > > if (ptr!= NULL) free(ptr); > > That shouldn’t be necessary for OpenSSL. If you find places where it is, > > please open an issue. > > OK. I'll mention a few, but

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Ken Goldman
On 12/22/2017 9:24 AM, Salz, Rich via openssl-users wrote: if (ptr!= NULL) free(ptr); That shouldn’t be necessary for OpenSSL. If you find places where it is, please open an issue. OK. I'll mention a few, but it's a global issue. The code may handle NULL. However,

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Kurt Roeckx
On Fri, Dec 22, 2017 at 01:06:20PM +, Salz, Rich via openssl-dev wrote: > Our intent is that all FREE functions can handle NULL. If you find things > missing or undocumented, please open an issue on GitHub. Thanks! I think we fixed all such cases in 1.1.0, all *_free() functions should

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Salz, Rich via openssl-users
> if (ptr!= NULL) free(ptr); That shouldn’t be necessary for OpenSSL. If you find places where it is, please open an issue. ➢ BTW, "can handle" should explicitly say what happens. Perhaps use the C library text, which says: If ptr is NULL, no operation is

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Ken Goldman
On 12/22/2017 8:06 AM, Salz, Rich via openssl-users wrote: Our intent is that all FREE functions can handle NULL. If you find things missing or undocumented, please open an issue on GitHub. Thanks! It would be great if that was documented for all _free() functions. I currently always code

Re: [openssl-users] [openssl-dev] Is X509_free(NULL) ok?

2017-12-22 Thread Salz, Rich via openssl-users
Our intent is that all FREE functions can handle NULL. If you find things missing or undocumented, please open an issue on GitHub. Thanks! -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Query related to d2i_X509 and X509_free

2013-10-11 Thread sandeepa sharma
Hi, We are using openssl-1.0.0e. I am facing a memory leak of 98 bytes when I use d2i_X509() function. This memory leak is seen even if d2i_X509() return NULL. I couldn't find the source code for d2i_X509() and X509_free() function. Can you please help me in this. int

Re: memory crash when calling X509_free function

2013-10-04 Thread Michel
Could it be because of a misuse of X509_dup() or CRYPTO_add( ..., 1, CRYPTO_LOCK_X509 ) in a copy constructor or an assignment operator ? #10 0x08052673 in CertificateRemote::cleanup_x509 (this=0x9bb55f0) at syfer/crypto/Certificate.cpp:309 What could be possible reason for the above crash ?

memory crash when calling X509_free function

2013-10-03 Thread Sanjay Kumar (sanjaku5)
(NULL, bptr, cert_len); /*x509 structure is allocated here*/ if (x509 == NULL) { syfer_log-ERR(DER to x509 converion failed); return RET_ERROR; } return RET_SUCCESS; } 2. Clean up the X509 structure Void cleanup_x509() { X509_free(x509); } Query: When I call

Re: memory crash when calling X509_free function

2013-10-03 Thread Pravesh Rai
is allocated here*/ if (x509 == NULL) { syfer_log-ERR(DER to x509 converion failed); return RET_ERROR; } return RET_SUCCESS; } ** ** **2. **Clean up the X509 structure ** ** Void cleanup_x509() { X509_free(x509

RE: memory crash when calling X509_free function

2013-10-03 Thread Dave Thompson
when calling X509_free function snip: method(?) which creates/parses X509 from DER and another which frees it and gets: I get the memory crash Backtrace: Program terminated with signal 11, Segmentation fault. #0 0x081e7748 in ASN1_STRING_free () #0 0x081e7748 in ASN1_STRING_free

Re: How to Check Whether the resources of X509 has been freed when it is freed by X509_free()

2011-09-09 Thread Jakob Bohm
*/ /* Cleaning up resources of x509Cert */ if(x509Cert != NULL) X509_free(x509Cert); My questions are: 1. How to check that x509Cert resources have been freed? I notice that X509_free(x509Cert) does not set the x509Cert to NULL, therefore I can not rely on if(x509Cert != NULL) to verify that x509Cert resources

Re: How to Check Whether the resources of X509 has been freed when it is freed by X509_free()

2011-09-09 Thread Erwin Himawan
has been freed when it is freed by X509_free() On 9/9/2011 5:21 AM, Erwin Himawan wrote: Hi All, I have several questions associated with freeing resources of X509 struct. snippet of my code: X509 *x509Cert = X509_new(); if (x509Cert == NULL) printf(Error instantiating X509 object\n); /* do

How to Check Whether the resources of X509 has been freed when it is freed by X509_free()

2011-09-08 Thread Erwin Himawan
*/ if(x509Cert != NULL) X509_free(x509Cert); My questions are: 1. How to check that x509Cert resources have been freed? I notice that X509_free(x509Cert) does not set the x509Cert to NULL, therefore I can not rely on if(x509Cert != NULL) to verify that x509Cert resources has been freed. this a bug

X509_free() ?

2005-12-21 Thread Rajeshwar Singh Jenwar
Hi All, 1. Can anybody give a hint where exactly X509_free() is defined ? 2. I m doubting on some memory leak in OpenSLL on our port version, any pointer how to debug that ? Thanks Regards, RSJ

Re: X509_free() ?

2005-12-21 Thread Dr. Stephen Henson
On Wed, Dec 21, 2005, Rajeshwar Singh Jenwar wrote: 1. Can anybody give a hint where exactly X509_free() is defined ? It is defined with the macro IMPLEMENT_ASN1_FUNCTIONS(X509) but that is only a wrapper round ASN1_item_free(). That probaly wont help... 2. I m doubting on some memory leak

undefined symbol: X509_free

2005-08-29 Thread Toney Samuel
cluster1:/usr/local/apache2/bin # ./apachectl startssl Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: undefined symbol: X509_free

Fwd: undefined symbol: X509_free

2005-08-29 Thread Toney Samuel
# ./apachectl startssl Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf:Cannot load /usr/local/apache2/modules/mod_ssl.so into server:/usr/local/apache2/modules/mod_ssl.so: undefined symbol: X509_free Regards toney

Re: undefined symbol: X509_free

2005-08-29 Thread Richard Levitte - VMS Whacker
In message [EMAIL PROTECTED] on Tue, 30 Aug 2005 08:07:03 +0530, Toney Samuel [EMAIL PROTECTED] said: toney.samuel i have downloaded openssl-0.9.8.tar.gz. I untared it then configured toney.samuel it with these switches toney.samuel ./config --prefix=/usr/local shared zlib-dynamic toney.samuel

X509_free vs. EVP_PKEY_free ?

2003-10-08 Thread Dann Daggett
Greetings All, I have a ques about X509_free() vs. EVP_PKEY_free(). In my init code (err logic removed) I get the key using: x509 = PEM_read_X509(fp, NULL, NULL, NULL); SrvPubKey = X509_get_pubkey(x509); X509_free(x509); And later in my exit code I use

Solved: X509_free vs. EVP_PKEY_free ?

2003-10-08 Thread Dann Daggett
-Original Message- Greetings All, I have a ques about X509_free() vs. EVP_PKEY_free(). In my init code (err logic removed) I get the key using: x509 = PEM_read_X509(fp, NULL, NULL, NULL); SrvPubKey = X509_get_pubkey(x509); X509_free(x509); And later in my

Re: Solved: X509_free vs. EVP_PKEY_free ?

2003-10-08 Thread Dr. Stephen Henson
On Wed, Oct 08, 2003, Dann Daggett wrote: -Original Message- Greetings All, I have a ques about X509_free() vs. EVP_PKEY_free(). In my init code (err logic removed) I get the key using: x509 = PEM_read_X509(fp, NULL, NULL, NULL); SrvPubKey = X509_get_pubkey(x509