projects
/
mech_eap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid MIT compat API when building with Heimdal
[mech_eap.git]
/
mech_eap
/
util_context.c
diff --git
a/mech_eap/util_context.c
b/mech_eap/util_context.c
index
57bd151
..
b7a50c6
100644
(file)
--- a/
mech_eap/util_context.c
+++ b/
mech_eap/util_context.c
@@
-214,7
+214,7
@@
gssEapVerifyToken(OM_uint32 *minor,
OM_uint32
gssEapContextTime(OM_uint32 *minor,
OM_uint32
gssEapContextTime(OM_uint32 *minor,
- gss_ctx_id_t context_handle,
+ gss_c
onst_c
tx_id_t context_handle,
OM_uint32 *time_rec)
{
*minor = 0;
OM_uint32 *time_rec)
{
*minor = 0;
@@
-282,7
+282,6
@@
gssEapMakeOrVerifyTokenMIC(OM_uint32 *minor,
kiov = GSSEAP_CALLOC(kiovCount, sizeof(*kiov));
if (kiov == NULL) {
kiov = GSSEAP_CALLOC(kiovCount, sizeof(*kiov));
if (kiov == NULL) {
- major = GSS_S_FAILURE;
*minor = ENOMEM;
goto cleanup;
}
*minor = ENOMEM;
goto cleanup;
}
@@
-290,13
+289,11
@@
gssEapMakeOrVerifyTokenMIC(OM_uint32 *minor,
innerTokTypes = GSSEAP_MALLOC(4 * tokens->buffers.count);
if (innerTokTypes == NULL) {
*minor = ENOMEM;
innerTokTypes = GSSEAP_MALLOC(4 * tokens->buffers.count);
if (innerTokTypes == NULL) {
*minor = ENOMEM;
- major = GSS_S_FAILURE;
goto cleanup;
}
innerTokLengths = GSSEAP_MALLOC(4 * tokens->buffers.count);
if (innerTokLengths == NULL) {
goto cleanup;
}
innerTokLengths = GSSEAP_MALLOC(4 * tokens->buffers.count);
if (innerTokLengths == NULL) {
- major = GSS_S_FAILURE;
*minor = ENOMEM;
goto cleanup;
}
*minor = ENOMEM;
goto cleanup;
}
@@
-356,8
+353,13
@@
gssEapMakeOrVerifyTokenMIC(OM_uint32 *minor,
} else {
size_t checksumSize;
} else {
size_t checksumSize;
+#ifdef HAVE_HEIMDAL_VERSION
+ code = krb5_checksumsize(krbContext, ctx->checksumType,
+ &checksumSize);
+#else
code = krb5_c_checksum_length(krbContext, ctx->checksumType,
&checksumSize);
code = krb5_c_checksum_length(krbContext, ctx->checksumType,
&checksumSize);
+#endif
if (code != 0)
goto cleanup;
if (code != 0)
goto cleanup;