<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/cryptography.git/src/cryptography/fernet.py, branch dependabot/github_actions/actions/setup-python-2.3.1</title>
<subtitle>github.com: pyca/cryptography.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/'/>
<entry>
<title>Final polish on removing backends from places they aren't required (#6644)</title>
<updated>2021-11-21T21:01:31+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-11-21T21:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=d09e1eda2bd4f489c5fc7078b58cabb0aa3a7aed'/>
<id>d09e1eda2bd4f489c5fc7078b58cabb0aa3a7aed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update annotation for key (#5951)</title>
<updated>2021-04-03T23:02:22+00:00</updated>
<author>
<name>Sam Bull</name>
<email>aa6bs0@sambull.org</email>
</author>
<published>2021-04-03T23:02:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=2839b4b6a2e6c98023748ebccf58649afe6038e4'/>
<id>2839b4b6a2e6c98023748ebccf58649afe6038e4</id>
<content type='text'>
* Update annotation for key

* Update fernet.py

* Update fernet.py</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Update annotation for key

* Update fernet.py

* Update fernet.py</pre>
</div>
</content>
</entry>
<entry>
<title>more typing (#5887)</title>
<updated>2021-03-02T17:48:03+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2021-03-02T17:48:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=032a7f3cdca5207d3b1e2a5eed14897d88f78378'/>
<id>032a7f3cdca5207d3b1e2a5eed14897d88f78378</id>
<content type='text'>
* backend typing for twofactor package and more otp work

* even more typing

* style fixes

* no generic typing for _get_backend

* remove unneeded typing</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* backend typing for twofactor package and more otp work

* even more typing

* style fixes

* no generic typing for _get_backend

* remove unneeded typing</pre>
</div>
</content>
</entry>
<entry>
<title>Apply type annotations to x509 ct and ocsp (#5712)</title>
<updated>2021-01-30T22:44:14+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-01-30T22:44:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=f16bff2cbd2855f0becb27724334e4bdb0679247'/>
<id>f16bff2cbd2855f0becb27724334e4bdb0679247</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Apply type annotations to fernet (#5708)</title>
<updated>2021-01-29T21:39:20+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-01-29T21:39:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=db9e20a4cefdf8802d89740d54188d9c53975fe4'/>
<id>db9e20a4cefdf8802d89740d54188d9c53975fe4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Complete removal of py2 (#5533)</title>
<updated>2020-12-09T15:13:48+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-12-09T15:13:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=e66db8079d3fbd0110e87ece1fd48f4bfd9e48b9'/>
<id>e66db8079d3fbd0110e87ece1fd48f4bfd9e48b9</id>
<content type='text'>
* Drop Python 2

* Black everything</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Drop Python 2

* Black everything</pre>
</div>
</content>
</entry>
<entry>
<title>Remove __future__ import from our code (#5610)</title>
<updated>2020-12-09T06:35:11+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-12-09T06:35:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=e0477596f7117845aa2d8768bf1b75162b3d915b'/>
<id>e0477596f7117845aa2d8768bf1b75162b3d915b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>use _get_backend everywhere (#5408)</title>
<updated>2020-08-16T22:04:10+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2020-08-16T22:04:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=0ed8d6624608c1a23f5a2909b3db45c56915f20e'/>
<id>0ed8d6624608c1a23f5a2909b3db45c56915f20e</id>
<content type='text'>
* use _get_backend everywhere

* black</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* use _get_backend everywhere

* black</pre>
</div>
</content>
</entry>
<entry>
<title>Paint it Black by the Rolling Stones (#5324)</title>
<updated>2020-07-20T18:06:29+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-07-20T18:06:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=60aa04481fb187334a783c2d9facc3fe814af5d1'/>
<id>60aa04481fb187334a783c2d9facc3fe814af5d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow ttl=None in (Multi)Fernet.decrypt_at_time() (#5280)</title>
<updated>2020-06-25T01:51:54+00:00</updated>
<author>
<name>Jakub Stasiak</name>
<email>jakub@stasiak.at</email>
</author>
<published>2020-06-25T01:51:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/cryptography.git/commit/?id=97193752945cd62eef4371f7c8c04e7806d9e37b'/>
<id>97193752945cd62eef4371f7c8c04e7806d9e37b</id>
<content type='text'>
* Disallow ttl=None in (Multi)Fernet.decrypt_at_time()

Since the introduction of the _at_time() methods in #5256[1] there's
been this little voice in the back of my mind telling me that maybe it's
not the best idea to allow ttl=None in decrypt_at_time(). It's been like
this for convenience and code reuse reasons.

Then I submitted a patch for cryptography stubs in typeshed[2] and I had
to decide whether to define decrypt_at_time()'s ttl as int and be
incompatible with cryptography's behavior or Optional[int] and advertise
an API that can be misused much too easily. I went ahead with int.

Considering the above I decided to propose this patch. Some amount of
redundancy (and a new test to properly cover the
MultiFernet.decrypt_at_time() implementation) is a price to prevent
clients from shooting themselves in the foot with the tll=None gun since
setting ttl to None disabled timestamp checks even if current_time was
provided.

[1] https://github.com/pyca/cryptography/pull/5256
[2] https://github.com/python/typeshed/pull/4238

* Actually test the return value here

* Fix formatting</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Disallow ttl=None in (Multi)Fernet.decrypt_at_time()

Since the introduction of the _at_time() methods in #5256[1] there's
been this little voice in the back of my mind telling me that maybe it's
not the best idea to allow ttl=None in decrypt_at_time(). It's been like
this for convenience and code reuse reasons.

Then I submitted a patch for cryptography stubs in typeshed[2] and I had
to decide whether to define decrypt_at_time()'s ttl as int and be
incompatible with cryptography's behavior or Optional[int] and advertise
an API that can be misused much too easily. I went ahead with int.

Considering the above I decided to propose this patch. Some amount of
redundancy (and a new test to properly cover the
MultiFernet.decrypt_at_time() implementation) is a price to prevent
clients from shooting themselves in the foot with the tll=None gun since
setting ttl to None disabled timestamp checks even if current_time was
provided.

[1] https://github.com/pyca/cryptography/pull/5256
[2] https://github.com/python/typeshed/pull/4238

* Actually test the return value here

* Fix formatting</pre>
</div>
</content>
</entry>
</feed>
