hack for gss-wrap-iov to it work

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:
Stefan Metzmacher
2009-08-28 18:12:03 +02:00
committed by Love Hornquist Astrand
parent 33019cc597
commit 2f1a370cd3
3 changed files with 58 additions and 21 deletions

View File

@@ -608,10 +608,13 @@ _gssapi_wrap_cfx_iov(OM_uint32 *minor_status,
goto failure;
}
if (trailer) {
token->EC[0] = (trailer->buffer.length >> 8) & 0xFF;
token->EC[1] = (trailer->buffer.length >> 0) & 0xFF;
if (rrc) {
token->RRC[0] = (rrc >> 8) & 0xFF;
token->RRC[1] = (rrc >> 0) & 0xFF;
}
token->EC[0] = (k5tsize >> 8) & 0xFF;
token->EC[1] = (k5tsize >> 0) & 0xFF;
}
if (conf_state != NULL)
@@ -914,19 +917,24 @@ _gssapi_unwrap_cfx_iov(OM_uint32 *minor_status,
size_t gsstsize = ec;
size_t gsshsize = sizeof(*token);
/* Check RRC */
if (rrc != 0) {
*minor_status = EINVAL;
major_status = GSS_S_FAILURE;
goto failure;
}
if (trailer == NULL) {
/* Check RRC */
if (rrc != gsstsize) {
*minor_status = EINVAL;
major_status = GSS_S_FAILURE;
goto failure;
}
gsshsize += gsstsize;
gsstsize = 0;
} else if (trailer->buffer.length != gsstsize) {
major_status = GSS_S_DEFECTIVE_TOKEN;
goto failure;
} else if (rrc != 0) {
/* Check RRC */
*minor_status = EINVAL;
major_status = GSS_S_FAILURE;
goto failure;
}
if (header->buffer.length != gsshsize) {