<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pyopenssl.git/tests/test_crypto.py, branch dependabot/github_actions/actions/setup-python-2.3.1</title>
<subtitle>github.com: pyca/pyopenssl.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/'/>
<entry>
<title>Remove some more py27-isms (#1062)</title>
<updated>2021-11-23T20:56:09+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-11-23T20:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=11b9bc5cb5efd5cafd9fe4cf7a99a1252213025b'/>
<id>11b9bc5cb5efd5cafd9fe4cf7a99a1252213025b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fill in notBefore/notAfter in X509 _PKeyInteractionTestsMixin tests (#1039)</title>
<updated>2021-09-07T18:24:13+00:00</updated>
<author>
<name>David Benjamin</name>
<email>davidben@google.com</email>
</author>
<published>2021-09-07T18:24:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=8e1f599eb6bb4fc129ce0519506945fb306713fa'/>
<id>8e1f599eb6bb4fc129ce0519506945fb306713fa</id>
<content type='text'>
While the tests currently pass without it, this is because OpenSSL's
encoder doesn't notice that it is emitting garbage. See
https://github.com/openssl/openssl/issues/16538

Fill in a placeholder validity period so the tests both better mirror
real X.509 signing code and do not rely on this bug.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While the tests currently pass without it, this is because OpenSSL's
encoder doesn't notice that it is emitting garbage. See
https://github.com/openssl/openssl/issues/16538

Fill in a placeholder validity period so the tests both better mirror
real X.509 signing code and do not rely on this bug.</pre>
</div>
</content>
</entry>
<entry>
<title>Don't try to serialize invalid objects in tests (#1037)</title>
<updated>2021-08-23T03:19:40+00:00</updated>
<author>
<name>David Benjamin</name>
<email>davidben@google.com</email>
</author>
<published>2021-08-23T03:19:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=30e82d4ba5e3817a77e212540477da701460e988'/>
<id>30e82d4ba5e3817a77e212540477da701460e988</id>
<content type='text'>
A default-constructed X509_REQ or NETSCAPE_SPKI contains empty values
for all its fields, notably the OIDs in public keys. This initial state
is incomplete and not yet a valid object. The ASN.1 structures make the
public key mandatory.  When serializing, OpenSSL would previously
silently omit the field, which doesn't actually produce a valid
structure.

As of https://github.com/openssl/openssl/pull/16027, OpenSSL will notice
this and return an error rather than serialize garbage. Sadly, that had
to be reverted on 1.1.1, but it is present in the 3.0 branch. With that
change, some of pyOpenSSL's tests fail.

The bug here is in pyOpenSSL: pyOpenSSL tests are trying to serialize
incomplete objects. Instead, fill in the public key.  While not
syntactically necessary (the empty string is a BIT STRING), also fill in
the signature for NetscapeSPKI, to better align with real code.

Tested by running pyOpenSSL tests against a copy of OpenSSL 1.1.1's dev
branch, prior to the changes getting reverted.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A default-constructed X509_REQ or NETSCAPE_SPKI contains empty values
for all its fields, notably the OIDs in public keys. This initial state
is incomplete and not yet a valid object. The ASN.1 structures make the
public key mandatory.  When serializing, OpenSSL would previously
silently omit the field, which doesn't actually produce a valid
structure.

As of https://github.com/openssl/openssl/pull/16027, OpenSSL will notice
this and return an error rather than serialize garbage. Sadly, that had
to be reverted on 1.1.1, but it is present in the 3.0 branch. With that
change, some of pyOpenSSL's tests fail.

The bug here is in pyOpenSSL: pyOpenSSL tests are trying to serialize
incomplete objects. Instead, fill in the public key.  While not
syntactically necessary (the empty string is a BIT STRING), also fill in
the signature for NetscapeSPKI, to better align with real code.

Tested by running pyOpenSSL tests against a copy of OpenSSL 1.1.1's dev
branch, prior to the changes getting reverted.</pre>
</div>
</content>
</entry>
<entry>
<title>fix a memleak (#967)</title>
<updated>2020-11-27T21:22:30+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2020-11-27T21:22:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=09b5d7071846a7abdb8061711ac0d2e561f7260a'/>
<id>09b5d7071846a7abdb8061711ac0d2e561f7260a</id>
<content type='text'>
* fix a memleak

* black</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix a memleak

* black</pre>
</div>
</content>
</entry>
<entry>
<title>crypto._PassphraseHelper: pass non-callable passphrase using callback (#947)</title>
<updated>2020-10-13T04:14:19+00:00</updated>
<author>
<name>Huw Jones</name>
<email>huw@huwcbjones.co.uk</email>
</author>
<published>2020-10-13T04:14:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=cdd6696025b997646497b85cc0db6b27db12f92b'/>
<id>cdd6696025b997646497b85cc0db6b27db12f92b</id>
<content type='text'>
* crypto._PassphraseHelper: pass non-callable passphrase using callback
Fixes #945

Before this commit, we would pass a bytes passphrase as a null terminated string.
This causes issue when a randomly generated key's first byte is null because
OpenSSL rightly determines the key length is 0.
This commit modifies the passphrase helper to pass the passphrase via the
 callback

* Update changelog to document bug fix</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* crypto._PassphraseHelper: pass non-callable passphrase using callback
Fixes #945

Before this commit, we would pass a bytes passphrase as a null terminated string.
This causes issue when a randomly generated key's first byte is null because
OpenSSL rightly determines the key length is 0.
This commit modifies the passphrase helper to pass the passphrase via the
 callback

* Update changelog to document bug fix</pre>
</div>
</content>
</entry>
<entry>
<title>Allow using additional untrusted certificates for chain building in X509StoreContext (#948)</title>
<updated>2020-10-12T13:42:23+00:00</updated>
<author>
<name>Sándor Oroszi</name>
<email>oroszisam@gmail.com</email>
</author>
<published>2020-10-12T13:42:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=83ef2306a1481e0cf7f53899c390497256711e29'/>
<id>83ef2306a1481e0cf7f53899c390497256711e29</id>
<content type='text'>
The additional certificates provided in the new `chain` parameter will be
untrusted but may be used to build the chain.

This makes it easier to validate a certificate against a store which
contains only root ca certificates, and the intermediates come from e.g.
the same untrusted source as the certificate to be verified.

Co-authored-by: Sandor Oroszi &lt;sandor.oroszi@balabit.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The additional certificates provided in the new `chain` parameter will be
untrusted but may be used to build the chain.

This makes it easier to validate a certificate against a store which
contains only root ca certificates, and the intermediates come from e.g.
the same untrusted source as the certificate to be verified.

Co-authored-by: Sandor Oroszi &lt;sandor.oroszi@balabit.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Allow using an OpenSSL hashed directory for verification in X509Store (#943)</title>
<updated>2020-09-11T15:17:31+00:00</updated>
<author>
<name>Sándor Oroszi</name>
<email>oroszisam@gmail.com</email>
</author>
<published>2020-09-11T15:17:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=43c97767afe7aa1dccefec35946dbc8b9cde73a4'/>
<id>43c97767afe7aa1dccefec35946dbc8b9cde73a4</id>
<content type='text'>
Add X509Store.load_locations() to set a CA bundle file and/or an OpenSSL-
style hashed CA/CRL lookup directory, similar to the already existing
SSL.Context.load_verify_locations().

Co-authored-by: Sandor Oroszi &lt;sandor.oroszi@balabit.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add X509Store.load_locations() to set a CA bundle file and/or an OpenSSL-
style hashed CA/CRL lookup directory, similar to the already existing
SSL.Context.load_verify_locations().

Co-authored-by: Sandor Oroszi &lt;sandor.oroszi@balabit.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Allow accessing a connection's verfied certificate chain (#894)</title>
<updated>2020-08-05T23:48:51+00:00</updated>
<author>
<name>Shane Harvey</name>
<email>shane.harvey@mongodb.com</email>
</author>
<published>2020-08-05T23:48:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=33c5499ce34f5e1c7c2630c6a1446353eee31755'/>
<id>33c5499ce34f5e1c7c2630c6a1446353eee31755</id>
<content type='text'>
* Allow accessing a connection's verfied certificate chain

Add X509StoreContext.get_verified_chain using X509_STORE_CTX_get1_chain.
Add Connection.get_verified_chain using SSL_get0_verified_chain if
available (ie OpenSSL 1.1+) and X509StoreContext.get_verified_chain
otherwise.
Fixes #740.

* TLSv1_METHOD -&gt; SSLv23_METHOD

* Use X509_up_ref instead of X509_dup

* Add _openssl_assert where appropriate

* SSL_get_peer_cert_chain should not be null

* Reformat with black

* Fix &lt;OpenSSL.crypto.X509 object at 0x7fdbb59e8050&gt; != &lt;OpenSSL.crypto.X509 object at 0x7fdbb59daad0&gt;

* Add Changelog entry

* Remove _add_chain</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Allow accessing a connection's verfied certificate chain

Add X509StoreContext.get_verified_chain using X509_STORE_CTX_get1_chain.
Add Connection.get_verified_chain using SSL_get0_verified_chain if
available (ie OpenSSL 1.1+) and X509StoreContext.get_verified_chain
otherwise.
Fixes #740.

* TLSv1_METHOD -&gt; SSLv23_METHOD

* Use X509_up_ref instead of X509_dup

* Add _openssl_assert where appropriate

* SSL_get_peer_cert_chain should not be null

* Reformat with black

* Fix &lt;OpenSSL.crypto.X509 object at 0x7fdbb59e8050&gt; != &lt;OpenSSL.crypto.X509 object at 0x7fdbb59daad0&gt;

* Add Changelog entry

* Remove _add_chain</pre>
</div>
</content>
</entry>
<entry>
<title>update cert fixtures and simplify tests (#927)</title>
<updated>2020-08-03T22:50:31+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2020-08-03T22:50:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=beaf9f514ae9db428a17e96520111c27f3c330d9'/>
<id>beaf9f514ae9db428a17e96520111c27f3c330d9</id>
<content type='text'>
* simplify

* generate new certs and keys with 3072-bit RSA

* black

* add a test to avoid losing coverage</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* simplify

* generate new certs and keys with 3072-bit RSA

* black

* add a test to avoid losing coverage</pre>
</div>
</content>
</entry>
<entry>
<title>make our CI less frustrating (#926)</title>
<updated>2020-08-03T20:54:20+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2020-08-03T20:54:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyopenssl.git/commit/?id=c45a6ea2c9a792d1cf55eed024bad519d3174819'/>
<id>c45a6ea2c9a792d1cf55eed024bad519d3174819</id>
<content type='text'>
* make our CI less frustrating

* sigh, even less sensitive

* can we stop doing this on macos now?</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* make our CI less frustrating

* sigh, even less sensitive

* can we stop doing this on macos now?</pre>
</div>
</content>
</entry>
</feed>
