<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/x509, branch libressl-v2.1.3</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v2.1.3</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v2.1.3'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2014-12-06T19:26:37+00:00</updated>
<entry>
<title>Avoid modifying input on failure in X509_(TRUST|PURPOSE)_add.</title>
<updated>2014-12-06T19:26:37+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2014-12-06T19:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c0f239a5bb562e1815cb2ae500592f95db239eda'/>
<id>urn:sha1:c0f239a5bb562e1815cb2ae500592f95db239eda</id>
<content type='text'>
If X509_TRUST_add() or X509_PURPOSE_add() fail, they will leave the
object in an inconsistent state since the name is already freed.
This commit avoids changing the original name unless the *_add() call
will succeed.

Based on BoringSSL's commit: ab2815eaff6219ef57aedca2f7b1b72333c27fd0

ok miod@
</content>
</entry>
<entry>
<title>further BUF_strdup conversion: these places should be safe to rely on</title>
<updated>2014-11-18T03:28:05+00:00</updated>
<author>
<name>tedu</name>
<email></email>
</author>
<published>2014-11-18T03:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=869cc81dd908a614d1eb453fa73a49d0d193735a'/>
<id>urn:sha1:869cc81dd908a614d1eb453fa73a49d0d193735a</id>
<content type='text'>
the function argument not being NULL
</content>
</entry>
<entry>
<title>Get rid of the last remaining BUF_strdup and BUF_strlcpy and friends, use</title>
<updated>2014-10-16T03:19:02+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2014-10-16T03:19:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cd7a711274bfeecd7b0e36c535b010869192f2e1'/>
<id>urn:sha1:cd7a711274bfeecd7b0e36c535b010869192f2e1</id>
<content type='text'>
intrinsic functions everywhere, and wrap these functions in an
#ifndef LIBRESSL_INTERNAL to make sure we don't bring their use back.
</content>
</entry>
<entry>
<title>Previous fix (1.12) would cause a NULL pointer dereference in the error path</title>
<updated>2014-09-29T16:20:40+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-29T16:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2fec0ddac457c1eb5a9eba935bc918591b7a26df'/>
<id>urn:sha1:2fec0ddac457c1eb5a9eba935bc918591b7a26df</id>
<content type='text'>
if a NULL stack was passed as argument. Fix this by returning NULL early in
that case.
</content>
</entry>
<entry>
<title>check_cert(): be sure to reset ctx-&gt;current_crl to NULL before freeing it.</title>
<updated>2014-09-29T04:20:14+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-29T04:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=7a9b43ea80efe772f3376acf2a11048cbf5dcf00'/>
<id>urn:sha1:7a9b43ea80efe772f3376acf2a11048cbf5dcf00</id>
<content type='text'>
X509_STORE_CTX_init(): do not free the X509_STORE_CTX * parameter upon
failure, for we did not allocate it and it might not come from the heap,
such as in check_crl_path() in this very same file where X509_STORE_CTX_init()
gets invoked with a stack address.

ok bcook@
</content>
</entry>
<entry>
<title>X509_NAME_get_text_by_OBJ(): make sure we do not pass a negative size to</title>
<updated>2014-09-29T04:17:24+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-29T04:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=53395337c4644a571c35aad3a705862a559bd5fa'/>
<id>urn:sha1:53395337c4644a571c35aad3a705862a559bd5fa</id>
<content type='text'>
memcpy().
ok bcook@
</content>
</entry>
<entry>
<title>X509_VERIFY_PARAM_set1_name(): if invoked with NULL as the second</title>
<updated>2014-09-29T04:16:49+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-29T04:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=131a2b01be2aeb81f19d51ea81871452944d91e8'/>
<id>urn:sha1:131a2b01be2aeb81f19d51ea81871452944d91e8</id>
<content type='text'>
parameter, correctly set param-&gt;name to NULL after having freed it.
ok bcook@
</content>
</entry>
<entry>
<title>X509v3_add_ext(): do not free stuff we did not allocate in the error path.</title>
<updated>2014-09-28T10:53:57+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-28T10:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f798ca5bd1c94b098d04a07754aff0b498d679bc'/>
<id>urn:sha1:f798ca5bd1c94b098d04a07754aff0b498d679bc</id>
<content type='text'>
ok bcook@
</content>
</entry>
<entry>
<title>X509_TRUST_add(): check X509_TRUST_get0() return value before dereferencing it,</title>
<updated>2014-09-28T10:52:59+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-28T10:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=381995f489d8fa8080a47c12e6f19e40c6379e0b'/>
<id>urn:sha1:381995f489d8fa8080a47c12e6f19e40c6379e0b</id>
<content type='text'>
for it may be NULL. Do not leak memory upon error.

ok bcook@
</content>
</entry>
<entry>
<title>Someone (TM) thought it was smart to save memory by using malloc(1) and</title>
<updated>2014-09-28T10:50:33+00:00</updated>
<author>
<name>miod</name>
<email></email>
</author>
<published>2014-09-28T10:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1863db1d9486a762fe4bfcd46c7cce5e0971ed13'/>
<id>urn:sha1:1863db1d9486a762fe4bfcd46c7cce5e0971ed13</id>
<content type='text'>
manual field fiddling to create an ASN1_INTEGER object, instead of using
M_ASN1_INTEGER_new() which will allocate sizeof(long) bytes.
That person had probably never looked into malloc(3) and never heard of
allocation size rounding.

Thus, replace the obfuscated code with M_ASN1_INTEGER_new() followed by
ASN1_INTEGER_set(), to achieve a similar result, without the need for
/* version == 0 */ comments.

ok bcook@
</content>
</entry>
</feed>
