remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2006 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "krb5_locl.h"
|
||||
@@ -95,7 +95,7 @@ krb5_digest_set_server_cb(krb5_context context,
|
||||
goto error;
|
||||
|
||||
digest->init.channel->cb_binding = strdup(binding);
|
||||
if (digest->init.channel->cb_binding == NULL)
|
||||
if (digest->init.channel->cb_binding == NULL)
|
||||
goto error;
|
||||
return 0;
|
||||
error:
|
||||
@@ -273,7 +273,7 @@ digest_request(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
ret = krb5_make_principal(context, &principal,
|
||||
ret = krb5_make_principal(context, &principal,
|
||||
r, KRB5_DIGEST_NAME, r, NULL);
|
||||
if (ret)
|
||||
goto out;
|
||||
@@ -288,7 +288,7 @@ digest_request(krb5_context context,
|
||||
if (size != data.length)
|
||||
krb5_abortx(context, "ASN.1 internal encoder error");
|
||||
|
||||
ret = krb5_mk_req_exact(context, &ac,
|
||||
ret = krb5_mk_req_exact(context, &ac,
|
||||
AP_OPTS_USE_SUBKEY|AP_OPTS_MUTUAL_REQUIRED,
|
||||
principal, NULL, id, &req.apReq);
|
||||
if (ret)
|
||||
@@ -314,7 +314,7 @@ digest_request(krb5_context context,
|
||||
}
|
||||
|
||||
ret = krb5_encrypt_EncryptedData(context, crypto, usage,
|
||||
data.data, data.length, 0,
|
||||
data.data, data.length, 0,
|
||||
&req.innerReq);
|
||||
if (ret)
|
||||
goto out;
|
||||
@@ -376,7 +376,7 @@ digest_request(krb5_context context,
|
||||
&rep.innerRep, &data);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
||||
ret = decode_DigestRepInner(data.data, data.length, irep, NULL);
|
||||
if (ret) {
|
||||
krb5_set_error_message(context, ret,
|
||||
@@ -470,7 +470,7 @@ krb5_digest_set_client_nonce(krb5_context context,
|
||||
N_("clientNonce already set", ""));
|
||||
return EINVAL;
|
||||
}
|
||||
digest->request.clientNonce =
|
||||
digest->request.clientNonce =
|
||||
calloc(1, sizeof(*digest->request.clientNonce));
|
||||
if (digest->request.clientNonce == NULL) {
|
||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||
@@ -597,7 +597,7 @@ krb5_digest_set_method(krb5_context context,
|
||||
const char *method)
|
||||
{
|
||||
if (digest->request.method) {
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
N_("method already set", ""));
|
||||
return EINVAL;
|
||||
}
|
||||
@@ -650,7 +650,7 @@ krb5_digest_set_nonceCount(krb5_context context,
|
||||
N_("nonceCount already set", ""));
|
||||
return EINVAL;
|
||||
}
|
||||
digest->request.nonceCount =
|
||||
digest->request.nonceCount =
|
||||
malloc(sizeof(*digest->request.nonceCount));
|
||||
if (digest->request.nonceCount == NULL) {
|
||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||
@@ -721,7 +721,7 @@ krb5_digest_request(krb5_context context,
|
||||
|
||||
if (digest->request.type == NULL) {
|
||||
if (digest->init.type == NULL) {
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
N_("Type missing from req", ""));
|
||||
return EINVAL;
|
||||
}
|
||||
@@ -745,7 +745,7 @@ krb5_digest_request(krb5_context context,
|
||||
}
|
||||
|
||||
if (irep.element != choice_DigestRepInner_response) {
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
N_("digest reply not an DigestResponse", ""));
|
||||
ret = EINVAL;
|
||||
goto out;
|
||||
@@ -753,7 +753,7 @@ krb5_digest_request(krb5_context context,
|
||||
|
||||
ret = copy_DigestResponse(&irep.u.response, &digest->response);
|
||||
if (ret) {
|
||||
krb5_set_error_message(context, ret,
|
||||
krb5_set_error_message(context, ret,
|
||||
N_("Failed to copy initReply,", ""));
|
||||
goto out;
|
||||
}
|
||||
@@ -765,7 +765,7 @@ krb5_digest_request(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_boolean
|
||||
krb5_digest_rep_get_status(krb5_context context,
|
||||
krb5_digest_rep_get_status(krb5_context context,
|
||||
krb5_digest digest)
|
||||
{
|
||||
return digest->response.success ? TRUE : FALSE;
|
||||
@@ -837,7 +837,7 @@ struct krb5_ntlm_data {
|
||||
};
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_alloc(krb5_context context,
|
||||
krb5_ntlm_alloc(krb5_context context,
|
||||
krb5_ntlm *ntlm)
|
||||
{
|
||||
*ntlm = calloc(1, sizeof(**ntlm));
|
||||
@@ -862,7 +862,7 @@ krb5_ntlm_free(krb5_context context, krb5_ntlm ntlm)
|
||||
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_init_request(krb5_context context,
|
||||
krb5_ntlm_init_request(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
krb5_realm realm,
|
||||
krb5_ccache ccache,
|
||||
@@ -911,7 +911,7 @@ krb5_ntlm_init_request(krb5_context context,
|
||||
|
||||
ret = copy_NTLMInitReply(&irep.u.ntlmInitReply, &ntlm->initReply);
|
||||
if (ret) {
|
||||
krb5_set_error_message(context, ret,
|
||||
krb5_set_error_message(context, ret,
|
||||
N_("Failed to copy initReply", ""));
|
||||
goto out;
|
||||
}
|
||||
@@ -1018,7 +1018,7 @@ krb5_ntlm_request(krb5_context context,
|
||||
|
||||
if (irep.element == choice_DigestRepInner_error) {
|
||||
ret = irep.u.error.code;
|
||||
krb5_set_error_message(context, ret,
|
||||
krb5_set_error_message(context, ret,
|
||||
N_("NTLM response error: %s", ""),
|
||||
irep.u.error.reason);
|
||||
goto out;
|
||||
@@ -1026,14 +1026,14 @@ krb5_ntlm_request(krb5_context context,
|
||||
|
||||
if (irep.element != choice_DigestRepInner_ntlmResponse) {
|
||||
ret = EINVAL;
|
||||
krb5_set_error_message(context, ret,
|
||||
krb5_set_error_message(context, ret,
|
||||
N_("NTLM reply not an NTLMResponse", ""));
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = copy_NTLMResponse(&irep.u.ntlmResponse, &ntlm->response);
|
||||
if (ret) {
|
||||
krb5_set_error_message(context, ret,
|
||||
krb5_set_error_message(context, ret,
|
||||
N_("Failed to copy NTLMResponse", ""));
|
||||
goto out;
|
||||
}
|
||||
@@ -1045,7 +1045,7 @@ krb5_ntlm_request(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_flags(krb5_context context,
|
||||
krb5_ntlm_req_set_flags(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
uint32_t flags)
|
||||
{
|
||||
@@ -1054,7 +1054,7 @@ krb5_ntlm_req_set_flags(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_username(krb5_context context,
|
||||
krb5_ntlm_req_set_username(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
const char *username)
|
||||
{
|
||||
@@ -1067,7 +1067,7 @@ krb5_ntlm_req_set_username(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_targetname(krb5_context context,
|
||||
krb5_ntlm_req_set_targetname(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
const char *targetname)
|
||||
{
|
||||
@@ -1080,7 +1080,7 @@ krb5_ntlm_req_set_targetname(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_lm(krb5_context context,
|
||||
krb5_ntlm_req_set_lm(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
void *hash, size_t len)
|
||||
{
|
||||
@@ -1095,7 +1095,7 @@ krb5_ntlm_req_set_lm(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_ntlm(krb5_context context,
|
||||
krb5_ntlm_req_set_ntlm(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
void *hash, size_t len)
|
||||
{
|
||||
@@ -1110,7 +1110,7 @@ krb5_ntlm_req_set_ntlm(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_opaque(krb5_context context,
|
||||
krb5_ntlm_req_set_opaque(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
krb5_data *opaque)
|
||||
{
|
||||
@@ -1125,7 +1125,7 @@ krb5_ntlm_req_set_opaque(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_req_set_session(krb5_context context,
|
||||
krb5_ntlm_req_set_session(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
void *sessionkey, size_t length)
|
||||
{
|
||||
@@ -1145,19 +1145,19 @@ krb5_ntlm_req_set_session(krb5_context context,
|
||||
}
|
||||
|
||||
krb5_boolean
|
||||
krb5_ntlm_rep_get_status(krb5_context context,
|
||||
krb5_ntlm_rep_get_status(krb5_context context,
|
||||
krb5_ntlm ntlm)
|
||||
{
|
||||
return ntlm->response.success ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_ntlm_rep_get_sessionkey(krb5_context context,
|
||||
krb5_ntlm_rep_get_sessionkey(krb5_context context,
|
||||
krb5_ntlm ntlm,
|
||||
krb5_data *data)
|
||||
{
|
||||
if (ntlm->response.sessionkey == NULL) {
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
krb5_set_error_message(context, EINVAL,
|
||||
N_("no ntlm session key", ""));
|
||||
return EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user