8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00
This commit is contained in:
AlexPeshkoff 2021-05-11 14:31:40 +03:00
parent 182d85f5c6
commit 479037b056
12 changed files with 20 additions and 3 deletions

View File

@ -1958,6 +1958,8 @@ C --
PARAMETER (GDS__ses_reset_failed = 335545272)
INTEGER*4 GDS__block_size
PARAMETER (GDS__block_size = 335545273)
INTEGER*4 GDS__tom_key_length
PARAMETER (GDS__tom_key_length = 335545274)
INTEGER*4 GDS__gfix_db_name
PARAMETER (GDS__gfix_db_name = 335740929)
INTEGER*4 GDS__gfix_invalid_sw

View File

@ -1953,6 +1953,8 @@ const
gds_ses_reset_failed = 335545272;
isc_block_size = 335545273;
gds_block_size = 335545273;
isc_tom_key_length = 335545274;
gds_tom_key_length = 335545274;
isc_gfix_db_name = 335740929;
gds_gfix_db_name = 335740929;
isc_gfix_invalid_sw = 335740930;

View File

@ -5076,6 +5076,7 @@ const
isc_repl_error = 335545271;
isc_ses_reset_failed = 335545272;
isc_block_size = 335545273;
isc_tom_key_length = 335545274;
isc_gfix_db_name = 335740929;
isc_gfix_invalid_sw = 335740930;
isc_gfix_incmp_sw = 335740932;

View File

@ -975,6 +975,7 @@ static const struct {
{"repl_error", 335545271},
{"ses_reset_failed", 335545272},
{"block_size", 335545273},
{"tom_key_length", 335545274},
{"gfix_db_name", 335740929},
{"gfix_invalid_sw", 335740930},
{"gfix_incmp_sw", 335740932},

View File

@ -1009,6 +1009,7 @@ const ISC_STATUS isc_wrong_page = 335545270L;
const ISC_STATUS isc_repl_error = 335545271L;
const ISC_STATUS isc_ses_reset_failed = 335545272L;
const ISC_STATUS isc_block_size = 335545273L;
const ISC_STATUS isc_tom_key_length = 335545274L;
const ISC_STATUS isc_gfix_db_name = 335740929L;
const ISC_STATUS isc_gfix_invalid_sw = 335740930L;
const ISC_STATUS isc_gfix_incmp_sw = 335740932L;
@ -1501,7 +1502,7 @@ const ISC_STATUS isc_trace_switch_user_only = 337182757L;
const ISC_STATUS isc_trace_switch_param_miss = 337182758L;
const ISC_STATUS isc_trace_param_act_notcompat = 337182759L;
const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L;
const ISC_STATUS isc_err_max = 1445;
const ISC_STATUS isc_err_max = 1446;
#else /* c definitions */
@ -2480,6 +2481,7 @@ const ISC_STATUS isc_err_max = 1445;
#define isc_repl_error 335545271L
#define isc_ses_reset_failed 335545272L
#define isc_block_size 335545273L
#define isc_tom_key_length 335545274L
#define isc_gfix_db_name 335740929L
#define isc_gfix_invalid_sw 335740930L
#define isc_gfix_incmp_sw 335740932L
@ -2972,7 +2974,7 @@ const ISC_STATUS isc_err_max = 1445;
#define isc_trace_switch_param_miss 337182758L
#define isc_trace_param_act_notcompat 337182759L
#define isc_trace_mandatory_switch_miss 337182760L
#define isc_err_max 1445
#define isc_err_max 1446
#endif

View File

@ -978,6 +978,7 @@ Data source : @4"}, /* eds_statement */
{335545271, "Replication error"}, /* repl_error */
{335545272, "Reset of user session failed. Connection is shut down."}, /* ses_reset_failed */
{335545273, "File size is less than expected"}, /* block_size */
{335545274, "Invalid key length @1, need >@2"}, /* tom_key_length */
{335740929, "data base file name (@1) already given"}, /* gfix_db_name */
{335740930, "invalid switch @1"}, /* gfix_invalid_sw */
{335740932, "incompatible switch combination"}, /* gfix_incmp_sw */

View File

@ -974,6 +974,7 @@ static const struct {
{335545271, -902}, /* 951 repl_error */
{335545272, -902}, /* 952 ses_reset_failed */
{335545273, -902}, /* 953 block_size */
{335545274, -901}, /* 954 tom_key_length */
{335740929, -901}, /* 1 gfix_db_name */
{335740930, -901}, /* 2 gfix_invalid_sw */
{335740932, -901}, /* 4 gfix_incmp_sw */

View File

@ -974,6 +974,7 @@ static const struct {
{335545271, "HY000"}, // 951 repl_error
{335545272, "08003"}, // 952 ses_reset_failed
{335545273, "XX000"}, // 953 block_size
{335545274, "22023"}, // 954 tom_key_length
{335740929, "00000"}, // 1 gfix_db_name
{335740930, "00000"}, // 2 gfix_invalid_sw
{335740932, "00000"}, // 4 gfix_incmp_sw

View File

@ -3103,6 +3103,8 @@ dsc* evlEncryptDecrypt(thread_db* tdbb, const SysFunction* function, const NestV
{
case ALG_RC4:
{
if (key.getCount() < 5) // 40 bit - constant from tomcrypt
(Arg::Gds(isc_tom_key_length) << Arg::Num(key.getCount()) << Arg::Num(4)).raise();
rc4_state rc4;
tomCheck(rc4_stream_setup(&rc4, key.begin(), key.getCount()), Arg::Gds(isc_tom_init_cip) << "RC4");
@ -3153,6 +3155,8 @@ dsc* evlEncryptDecrypt(thread_db* tdbb, const SysFunction* function, const NestV
case ALG_SOBER:
{
if (key.getCount() < 4) // 4, 8, 12, ...
(Arg::Gds(isc_tom_key_length) << Arg::Num(key.getCount()) << Arg::Num(3)).raise();
sober128_state sober128;
tomCheck(sober128_stream_setup(&sober128, key.begin(), key.getCount()), Arg::Gds(isc_tom_init_cip) << "SOBER-128");
tomCheck(sober128_stream_setiv(&sober128, iv.begin(), iv.getCount()), Arg::Gds(isc_tom_setup_cip) << "SOBER-128");

View File

@ -1,7 +1,7 @@
/* MAX_NUMBER is the next number to be used, always one more than the highest message number. */
set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?);
--
('2021-03-18 11:20:00', 'JRD', 0, 954)
('2021-05-11 14:10:00', 'JRD', 0, 955)
('2015-03-17 18:33:00', 'QLI', 1, 533)
('2018-03-17 12:00:00', 'GFIX', 3, 136)
('1996-11-07 13:39:40', 'GPRE', 4, 1)

View File

@ -1061,6 +1061,7 @@ Data source : @4', NULL, NULL)
('repl_error', 'checkStatus', 'Publisher.cpp', NULL, 0, 951, NULL, 'Replication error', NULL, NULL);
('ses_reset_failed', NULL, 'Attachment.cpp', NULL, 0, 952, NULL, 'Reset of user session failed. Connection is shut down.', NULL, NULL);
('block_size', NULL, 'unix.cpp', NULL, 0, 953, NULL, 'File size is less than expected', NULL, NULL);
('tom_key_length', NULL, 'SysFunction.cpp', NULL, 0, 954, NULL, 'Invalid key length @1, need >@2', NULL, NULL);
-- QLI
(NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL);
(NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL);

View File

@ -960,6 +960,7 @@ set bulk_insert INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, FA
(-902, 'HY', '000', 0, 951, 'repl_error', NULL, NULL)
(-902, '08', '003', 0, 952, 'ses_reset_failed', NULL, NULL)
(-902, 'XX', '000', 0, 953, 'block_size', NULL, NULL)
(-901, '22', '023', 0, 954, 'tom_key_length', NULL, NULL)
-- GFIX
(-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL)
(-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL)