Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pkcs11 Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
smallstep
Pkcs11 Proxy
Commits
e25b74e2
Commit
e25b74e2
authored
15 years ago
by
Corentin Chary
Browse files
Options
Downloads
Patches
Plain Diff
pkcs11-proxy: return coherent error codes
Signed-off-by:
Corentin Chary
<
corentin.chary@gmail.com
>
parent
9032e390
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gck-rpc-module.c
+4
-4
4 additions, 4 deletions
gck-rpc-module.c
with
4 additions
and
4 deletions
gck-rpc-module.c
+
4
−
4
View file @
e25b74e2
...
@@ -338,7 +338,7 @@ static CK_RV call_connect(CallState * cs)
...
@@ -338,7 +338,7 @@ static CK_RV call_connect(CallState * cs)
if
(
!
p
||
!
ip
)
{
if
(
!
p
||
!
ip
)
{
gck_rpc_warn
(
"invalid syntax for pkcs11 socket : %s"
,
gck_rpc_warn
(
"invalid syntax for pkcs11 socket : %s"
,
pkcs11_socket_path
);
pkcs11_socket_path
);
return
-
1
;
return
CKR_DEVICE_ERROR
;
}
}
*
p
=
'\0'
;
*
p
=
'\0'
;
port
=
strtol
(
p
+
1
,
NULL
,
0
);
port
=
strtol
(
p
+
1
,
NULL
,
0
);
...
@@ -348,7 +348,7 @@ static CK_RV call_connect(CallState * cs)
...
@@ -348,7 +348,7 @@ static CK_RV call_connect(CallState * cs)
if
(
sock
<
0
)
{
if
(
sock
<
0
)
{
gck_rpc_warn
(
"couldn't create pkcs11 socket: %s"
,
gck_rpc_warn
(
"couldn't create pkcs11 socket: %s"
,
strerror
(
errno
));
strerror
(
errno
));
return
-
1
;
return
CKR_DEVICE_ERROR
;
}
}
if
(
setsockopt
(
sock
,
IPPROTO_TCP
,
TCP_NODELAY
,
if
(
setsockopt
(
sock
,
IPPROTO_TCP
,
TCP_NODELAY
,
...
@@ -356,14 +356,14 @@ static CK_RV call_connect(CallState * cs)
...
@@ -356,14 +356,14 @@ static CK_RV call_connect(CallState * cs)
gck_rpc_warn
gck_rpc_warn
(
"couldn't create set pkcs11 socket options : %s"
,
(
"couldn't create set pkcs11 socket options : %s"
,
strerror
(
errno
));
strerror
(
errno
));
return
-
1
;
return
CKR_DEVICE_ERROR
;
}
}
addr
.
sun_family
=
AF_INET
;
addr
.
sun_family
=
AF_INET
;
if
(
inet_aton
(
ip
,
&
((
struct
sockaddr_in
*
)
&
addr
)
->
sin_addr
)
==
if
(
inet_aton
(
ip
,
&
((
struct
sockaddr_in
*
)
&
addr
)
->
sin_addr
)
==
0
)
{
0
)
{
gck_rpc_warn
(
"bad inet address : %s"
,
ip
);
gck_rpc_warn
(
"bad inet address : %s"
,
ip
);
return
-
1
;
return
CKR_DEVICE_ERROR
;
}
}
((
struct
sockaddr_in
*
)
&
addr
)
->
sin_port
=
htons
(
port
);
((
struct
sockaddr_in
*
)
&
addr
)
->
sin_port
=
htons
(
port
);
}
else
{
}
else
{
...
...
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