Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
300b68fd
Commit
300b68fd
authored
22 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add some credential error log messages. Fix bug in credential signature
logging.
parent
23572d02
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/common/credential_utils.c
+6
-6
6 additions, 6 deletions
src/common/credential_utils.c
src/common/signature_utils.c
+4
-3
4 additions, 3 deletions
src/common/signature_utils.c
with
10 additions
and
9 deletions
src/common/credential_utils.c
+
6
−
6
View file @
300b68fd
...
...
@@ -134,18 +134,18 @@ verify_credential(slurm_ssl_key_ctx_t * ctx, slurm_job_credential_t * cred,
void
print_credential
(
slurm_job_credential_t
*
cred
)
{
int
i
;
int
i
,
j
=
0
;
long
long_tmp
;
char
sig_str
[
SLURM_SSL_SIGNATURE_LENGTH
*
3
];
char
sig_str
[
SLURM_SSL_SIGNATURE_LENGTH
*
4
];
for
(
i
=
0
;
i
<
SLURM_SSL_SIGNATURE_LENGTH
;
i
+=
sizeof
(
long
))
{
memcpy
(
&
long_tmp
,
&
cred
->
signature
[
i
],
sizeof
(
long
));
sprintf
(
&
sig_str
[
i
*
9
],
"%8lx "
,
long_tmp
);
sprintf
(
&
sig_str
[
(
j
++
)
*
9
],
"%8lx "
,
long_tmp
);
}
info
(
"cred uid:%u job_id:%u time:%lx
signature:%s
"
,
cred
->
user_id
,
cred
->
job_id
,
(
long
)
cred
->
expiration_time
,
sig_str
);
info
(
"cred uid:%u job_id:%u time:%lx"
,
cred
->
user_id
,
cred
->
job_id
,
(
long
)
cred
->
expiration_time
);
info
(
"cred signature:%s"
,
sig_str
);
}
int
revoke_credential
(
revoke_credential_msg_t
*
msg
,
List
list
)
...
...
This diff is collapsed.
Click to expand it.
src/common/signature_utils.c
+
4
−
3
View file @
300b68fd
...
...
@@ -65,7 +65,7 @@ int slurm_init_verifier(slurm_ssl_key_ctx_t * ctx, char *path)
fclose
(
cert_file
);
if
(
x509
==
NULL
)
{
/* ERR_print_errors_fp(log_fp()); */
error
(
"PEM_read_X509 error on %s"
,
path
);
slurm_seterrno
(
ESLURMD_OPENSSL_ERROR
);
return
SLURM_ERROR
;
}
...
...
@@ -74,7 +74,7 @@ int slurm_init_verifier(slurm_ssl_key_ctx_t * ctx, char *path)
X509_free
(
x509
);
if
(
ctx
->
key
.
public
==
NULL
)
{
/* ERR_print_errors_fp(log_fp()); */
error
(
"X509_get_pubkey no key in"
,
path
);
slurm_seterrno
(
ESLURMD_OPENSSL_ERROR
);
return
SLURM_ERROR
;
}
...
...
@@ -124,7 +124,8 @@ slurm_ssl_verify(slurm_ssl_key_ctx_t * ctx, char *data_buffer,
if
((
rc
=
EVP_VerifyFinal
(
&
md_ctx
,
signature_buffer
,
signature_length
,
ctx
->
key
.
public
))
!=
SLURM_OPENSSL_VERIFIED
)
{
/* ERR_print_errors_fp(log_fp()); */
error
(
"EVP_VerifyFinal: %s"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
slurm_seterrno_ret
(
ESLURMD_OPENSSL_ERROR
);
}
return
SLURM_SUCCESS
;
...
...
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