Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoherency between fields pgsodium.key.status and pgsodium.key.expires #74

Open
ioguix opened this issue Feb 8, 2023 · 0 comments
Open

Comments

@ioguix
Copy link
Collaborator

ioguix commented Feb 8, 2023

Hi,

It seems the pgsodium.key.status field can be incoherent with the real status of the key when it expires:

=# select * from pgsodium.create_key(expires => 'yesterday');
 id | name | status | key_type | key_id | key_context | created | expires | associated_data 
----+------+--------+----------+--------+-------------+---------+---------+-----------------
    |      |        |          |        |             |         |         | 
(1 row)

=# select * from pgsodium.key \gx
-[ RECORD 1 ]---+-------------------------------------
id              | 77421bb0-2489-4b5e-8a05-9a7e49bcb778
status          | valid                          -- <=== created as valid
created         | 2023-02-08 20:56:00.987969+01
expires         | 2023-02-07 00:00:00+01         -- <=== is expired !
key_type        | aead-det
key_id          | 1
[...]

Moreover, actual result of pgsodium.create_key() might seem confusing as it returns an empty line from view pgsodium.valid_key whereas the key is actually created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant