forked from michelp/pgsodium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cassert and debug/gdb flags for test image builder. * all the fixes for bad varhdrz usage, and switch all _P to _PP macros * fix oversized base64 decoding bug. * Add vscode include path
- Loading branch information
Showing
24 changed files
with
621 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Dockerfile | ||
test.sh | ||
psql.sh | ||
.dockerignore | ||
.git | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"/usr/include/postgresql/**" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/clang", | ||
"cStandard": "c17", | ||
"cppStandard": "c++14", | ||
"intelliSenseMode": "linux-clang-x64" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# pgsodium extension | ||
comment = 'Postgres extension for libsodium functions' | ||
default_version = '3.0.7' | ||
default_version = '3.0.8' | ||
relocatable = false | ||
schema = pgsodium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
CREATE OR REPLACE FUNCTION pgsodium.crypto_sign_update_agg1(state bytea, message bytea) | ||
RETURNS bytea | ||
AS | ||
$$ | ||
SELECT pgsodium.crypto_sign_update(COALESCE(state, pgsodium.crypto_sign_init()), message); | ||
$$ | ||
LANGUAGE SQL IMMUTABLE; | ||
|
||
COMMENT ON FUNCTION pgsodium.crypto_sign_update_agg1(bytea, bytea) IS | ||
'Internal helper function for crypto_sign_update_agg(bytea). This | ||
initializes state if it has not already been initialized.'; | ||
|
||
CREATE OR REPLACE FUNCTION pgsodium.crypto_sign_update_agg2(cur_state bytea, | ||
initial_state bytea, | ||
message bytea) | ||
RETURNS bytea | ||
as | ||
$$ | ||
SELECT pgsodium.crypto_sign_update( | ||
COALESCE(cur_state, initial_state), | ||
message) | ||
$$ | ||
LANGUAGE SQL IMMUTABLE; | ||
|
||
COMMENT ON FUNCTION pgsodium.crypto_sign_update_agg2(bytea, bytea, bytea) IS | ||
'Internal helper function for crypto_sign_update_agg(bytea, bytea). This | ||
initializes state to the state passed to the aggregate as a parameter, | ||
if it has not already been initialized.'; | ||
|
||
CREATE OR REPLACE AGGREGATE pgsodium.crypto_sign_update_agg(message bytea) | ||
( | ||
SFUNC = pgsodium.crypto_sign_update_agg1, | ||
STYPE = bytea, | ||
PARALLEL = unsafe); | ||
|
||
COMMENT ON AGGREGATE pgsodium.crypto_sign_update_agg(bytea) IS | ||
'Multi-part message signing aggregate that returns a state which can | ||
then be finalised using crypto_sign_final() or to which other parts | ||
can be added crypto_sign_update() or another message signing aggregate | ||
function. | ||
Note that when signing mutli-part messages using aggregates, the order | ||
in which message parts is processed is critical. You *must* ensure | ||
that the order of messages passed to the aggregate is invariant.'; | ||
|
||
CREATE OR REPLACE AGGREGATE pgsodium.crypto_sign_update_agg(state bytea, message bytea) | ||
( | ||
SFUNC = pgsodium.crypto_sign_update_agg2, | ||
STYPE = bytea, | ||
PARALLEL = unsafe); | ||
|
||
COMMENT ON AGGREGATE pgsodium.crypto_sign_update_agg(bytea, bytea) IS | ||
'Multi-part message signing aggregate that returns a state which can | ||
then be finalised using crypto_sign_final() or to which other parts | ||
can be added crypto_sign_update() or another message signing aggregate | ||
function. | ||
The first argument to this aggregate is the input state. This may be | ||
the result of a previous crypto_sign_update_agg(), a previous | ||
crypto_sign_update(). | ||
Note that when signing mutli-part messages using aggregates, the order | ||
in which message parts is processed is critical. You *must* ensure | ||
that the order of messages passed to the aggregate is invariant.'; | ||
|
Oops, something went wrong.