Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0250a16

Browse files
pgcrypto: report init errors as PXE_CIPHER_INIT
Report OpenSSL errors during initialization as PXE_CIPHER_INIT sincethat's just what they were, and not generic unknown errors. This alsoremoves the last users of the generic error, and thus it can be removed.Discussion:http://postgr.es/m/C89D932C-501E-4473-9750-638CFCD9095E@yesql.se
1 parent17ec5fa commit0250a16

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

‎contrib/pgcrypto/openssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ px_find_digest(const char *name, PX_MD **res)
209209
if (!ctx)
210210
{
211211
pfree(digest);
212-
return-1;
212+
returnPXE_CIPHER_INIT;
213213
}
214214
if (EVP_DigestInit_ex(ctx,md,NULL)==0)
215215
{
216216
EVP_MD_CTX_destroy(ctx);
217217
pfree(digest);
218-
return-1;
218+
returnPXE_CIPHER_INIT;
219219
}
220220

221221
digest->algo=md;

‎contrib/pgcrypto/px.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ struct error_desc
4141

4242
staticconststructerror_descpx_err_list[]= {
4343
{PXE_OK,"Everything ok"},
44-
{PXE_ERR_GENERIC,"Some PX error (not specified)"},
4544
{PXE_NO_HASH,"No such hash algorithm"},
4645
{PXE_NO_CIPHER,"No such cipher algorithm"},
4746
{PXE_BAD_OPTION,"Unknown option"},

‎contrib/pgcrypto/px.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* PX error codes
4545
*/
4646
#definePXE_OK0
47-
#definePXE_ERR_GENERIC-1
47+
/* -1 is unused */
4848
#definePXE_NO_HASH-2
4949
#definePXE_NO_CIPHER-3
5050
/* -4 is unused */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp