Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-gcrypt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-gcrypt
Commits
b27428ec
Commit
b27428ec
authored
Apr 13, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a fatal error handler.
parent
aefa6489
Pipeline
#170
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
vmod_gcrypt.c
src/vmod_gcrypt.c
+13
-1
No files found.
src/vmod_gcrypt.c
View file @
b27428ec
...
...
@@ -128,12 +128,23 @@ gcrypt_logger(void *priv, int level, const char *fmt, va_list args)
lvl
=
"DEBUG"
;
break
;
default:
VSL
(
SLT_Error
,
0
,
"Unknown gcrypt log level %d"
,
level
);
VSL
(
SLT_Error
,
0
,
"Unknown
lib
gcrypt log level %d"
,
level
);
}
VSL
(
tag
,
0
,
"libgcrypt log message follows (%s):"
,
lvl
);
VSLv
(
tag
,
0
,
fmt
,
args
);
}
static
void
__match_proto__
(
gcry_handler_error_t
)
gcrypt_fatal
(
void
*
priv
,
int
err
,
const
char
*
text
)
{
(
void
)
priv
;
if
(
text
==
NULL
)
text
=
gpg_strerror
(
err
);
VSL
(
SLT_Error
,
0
,
"libgcrypt fatal error, code=%d (%s), panic follows"
,
err
,
text
);
AZ
(
text
);
}
int
__match_proto__
(
vmod_event_f
)
event
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
enum
vcl_event_e
e
)
{
...
...
@@ -144,6 +155,7 @@ event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
if
(
gcrypt_version
!=
NULL
)
return
0
;
gcry_set_log_handler
(
gcrypt_logger
,
NULL
);
gcry_set_fatalerror_handler
(
gcrypt_fatal
,
NULL
);
gcrypt_version
=
gcry_check_version
(
MIN_GCRYPT_VERSION
);
if
(
gcrypt_version
==
NULL
)
{
VSL
(
SLT_VCL_Error
,
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment