Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ngx_http_voms_module
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Federico Fornari
ngx_http_voms_module
Commits
fdf6861d
Commit
fdf6861d
authored
7 years ago
by
Francesco Giacomini
Browse files
Options
Downloads
Patches
Plain Diff
[wip] generic attributes: fix test and code
parent
191e989a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ngx_http_voms_module.cpp
+5
-3
5 additions, 3 deletions
src/ngx_http_voms_module.cpp
t/voms_generic_attributes.t
+7
-6
7 additions, 6 deletions
t/voms_generic_attributes.t
with
12 additions
and
9 deletions
src/ngx_http_voms_module.cpp
+
5
−
3
View file @
fdf6861d
...
...
@@ -374,7 +374,7 @@ std::string get_voms_not_after(VomsAc const& ac)
static
std
::
string
encode
(
attribute
const
&
a
)
{
return
"n"
+
a
.
name
+
" v="
+
a
.
value
+
" q="
+
a
.
qualifier
;
return
"n
=
"
+
a
.
name
+
" v="
+
a
.
value
+
" q="
+
a
.
qualifier
;
}
std
::
string
get_voms_generic_attributes
(
VomsAc
const
&
ac
)
...
...
@@ -387,10 +387,12 @@ std::string get_voms_generic_attributes(VomsAc const& ac)
auto
&
gas
=
attributes
.
front
().
attributes
;
bool
first
=
true
;
for
(
auto
&
a
:
gas
)
{
result
+=
encode
(
a
);
if
(
!
first
)
{
if
(
first
)
{
first
=
false
;
}
else
{
result
+=
','
;
}
result
+=
encode
(
a
);
}
}
...
...
This diff is collapsed.
Click to expand it.
t/voms_generic_attributes.t
+
7
−
6
View file @
fdf6861d
...
...
@@ -5,7 +5,7 @@ run_tests();
__DATA__
=== TEST 1:
https with x509 client authentication, verification of valid VOMS attributes extracted by ngx_http_voms_module
=== TEST 1:
valid AC, including generic attributes
--- main_config
env OPENSSL_ALLOW_PROXY_CERTS=1;
env X509_VOMS_DIR=t/vomsdir;
...
...
@@ -46,11 +46,12 @@ GET /
/C=IT/O=IGI/CN=test0
/C=IT/O=IGI/CN=Test CA
/test/exp1,/test/exp2,/test/exp3/Role=PIPPO
/C=IT/O=IGI/CN=
nginx-
voms.example
/C=IT/O=IGI/CN=voms.example
/C=IT/O=IGI/CN=Test CA
test.vo
2018-01-01T00:00:00
2030-01-01T00:00:00
nickname = newland (test.vo),nickname = giaco (test.vo)
1644758975
voms.example:15000
20180101000000Z
20300101000000Z
n=nickname v=newland q=test.vo,n=nickname v=giaco q=test.vo
0
--- error_code: 200
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment