Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-ece
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-ece
Commits
c5c81240
Commit
c5c81240
authored
Sep 08, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add libcrypto_version().
parent
2a6c53fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
00basic.vtc
src/tests/00basic.vtc
+5
-0
vmod_ece.c
src/vmod_ece.c
+12
-0
vmod_ece.vcc
src/vmod_ece.vcc
+8
-0
No files found.
src/tests/00basic.vtc
View file @
c5c81240
...
...
@@ -33,6 +33,10 @@ varnish v1 -vcl {
if (!resp.http.x-version) {
set resp.status = 500;
}
set resp.http.x-libcrypto-version = ece.libcrypto_version();
if (!resp.http.x-libcrypto-version) {
set resp.status = 500;
}
return(deliver);
}
}
...
...
@@ -42,4 +46,5 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.http.x-version ~ "^.+$"
expect resp.http.x-libcrypto-version ~ "^.+$"
} -run
src/vmod_ece.c
View file @
c5c81240
...
...
@@ -28,6 +28,8 @@
#include "config.h"
#include <openssl/crypto.h>
#include "cache/cache.h"
#include "vcc_if.h"
...
...
@@ -59,6 +61,16 @@ VPFX(event)(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
NEEDLESS
(
return
(
0
));
}
VCL_STRING
vmod_libcrypto_version
(
VRT_CTX
)
{
(
void
)
ctx
;
VCL_STRING
version
=
OpenSSL_version
(
OPENSSL_VERSION
);
if
(
version
==
NULL
)
return
"unknown libcrypto version"
;
return
version
;
}
VCL_STRING
vmod_version
(
VRT_CTX
)
{
...
...
src/vmod_ece.vcc
View file @
c5c81240
...
...
@@ -56,6 +56,14 @@ Encryption and HTTP
XXX ...
$Function STRING libcrypto_version()
Return the libcrypto version string.
Example::
std.log("Using libcrypto version: " + ece.libcrypto_version());
$Function STRING version()
Return the version string for this VMOD.
...
...
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