Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
f035d9ce
...
f035d9ce8e917fbd2d9f8b8d2317dbbe868df165
authored
2003-05-26 09:57:45 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(auth_gssapi): Check return codes from gss_wrap, gss_unwrap.
1 parent
5c39e227
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
imap4d/auth_gss.c
imap4d/auth_gss.c
View file @
f035d9c
...
...
@@ -190,8 +190,14 @@ auth_gssapi (struct imap4d_command *command,
sec_level
=
htonl
((
SUPPORTED_P_MECH
<<
24
)
|
server_buffer_size
);
tokbuf
.
length
=
4
;
tokbuf
.
value
=
&
sec_level
;
gss_wrap
(
&
min_stat
,
context
,
0
,
GSS_C_QOP_DEFAULT
,
maj_stat
=
gss_wrap
(
&
min_stat
,
context
,
0
,
GSS_C_QOP_DEFAULT
,
&
tokbuf
,
&
cflags
,
&
outbuf
);
if
(
maj_stat
!=
GSS_S_COMPLETE
)
{
display_status
(
"wrap"
,
maj_stat
,
min_stat
);
return
RESP_NO
;
}
util_base64_encode
(
outbuf
.
value
,
outbuf
.
length
,
&
tmp
,
&
size
);
util_send
(
"+ %*.*s
\r\n
"
,
size
,
size
,
tmp
);
free
(
tmp
);
...
...
@@ -201,8 +207,14 @@ auth_gssapi (struct imap4d_command *command,
(
unsigned
char
**
)
&
tokbuf
.
value
,
&
tokbuf
.
length
);
free
(
token_str
);
gss_unwrap
(
&
min_stat
,
context
,
&
tokbuf
,
&
outbuf
,
&
cflags
,
&
quality
);
maj_stat
=
gss_unwrap
(
&
min_stat
,
context
,
&
tokbuf
,
&
outbuf
,
&
cflags
,
&
quality
);
free
(
tokbuf
.
value
);
if
(
maj_stat
!=
GSS_S_COMPLETE
)
{
display_status
(
"unwrap"
,
maj_stat
,
min_stat
);
return
RESP_NO
;
}
sec_level
=
ntohl
(
*
(
OM_uint32
*
)
outbuf
.
value
);
...
...
Please
register
or
sign in
to post a comment