remove trailing whitespace

This commit is contained in:
Love Hornquist Astrand
2011-05-21 11:57:31 -07:00
parent 25e86d6f4d
commit 0879b9831a
539 changed files with 6825 additions and 6825 deletions

View File

@@ -1,36 +1,36 @@
/*
* Copyright (c) 2010 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Portions Copyright (c) 2010 Apple Inc. 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 <sys/types.h>
@@ -57,7 +57,7 @@ heim_generate_challenge(const char *hostname)
t = time(NULL);
num = rk_random();
asprintf(&str, "<%lu%lu@%s>", (unsigned long)t,
(unsigned long)num, hostname);
@@ -164,7 +164,7 @@ heim_cram_md5_import(void *data, size_t len)
heim_CRAM_MD5_STATE state;
heim_cram_md5 ctx;
unsigned n;
if (len != sizeof(state))
return NULL;

View File

@@ -135,13 +135,13 @@ build_A2_hash(heim_digest_t context, const char *method)
unsigned char md[CC_MD5_DIGEST_LENGTH];
CC_MD5_CTX ctx;
char *A2;
CC_MD5_Init(&ctx);
if (method)
CC_MD5_Update(&ctx, method, strlen(method));
CC_MD5_Update(&ctx, ":", 1);
CC_MD5_Update(&ctx, context->clientURI, strlen(context->clientURI));
/* conf|int */
if (context->type != HEIM_DIGEST_TYPE_RFC2069) {
if (strcmp(context->clientQOP, "auth") != 0) {
@@ -152,7 +152,7 @@ build_A2_hash(heim_digest_t context, const char *method)
} else {
/* support auth-int ? */
}
CC_MD5_Final(md, &ctx);
hex_encode(md, sizeof(md), &A2);
@@ -265,7 +265,7 @@ parse_values(const char *string, struct md5_value **val)
goto error;
p2 += sz;
p1 = p2;
if (*p2 == '"') {
p1++;
while (*p2 == '"') {
@@ -292,7 +292,7 @@ parse_values(const char *string, struct md5_value **val)
goto nomem;
strncpy(v->mv_value, p1, p2 - p1);
v->mv_value[p2 - p1] = '\0';
if (p2[0] == '\0')
break;
if (p2[0] == '"')
@@ -418,7 +418,7 @@ heim_digest_parse_response(heim_digest_t context, const char *response)
if (context->clientUsername == NULL) goto out;
context->clientRealm = values_find(&val, "realm");
context->clientResponse = values_find(&val, "response");
if (context->clientResponse == NULL) goto out;

View File

@@ -56,7 +56,7 @@ heim_cram_md5_free(heim_cram_md5 ctx);
* response = read_from_client();
*
* heim_digest_parse_response(d, response);
*
*
* const char *user = heim_digest_get_key(d, "username");
* heim_digest_set_key(d, "password", "sommar17");
*

View File

@@ -293,7 +293,7 @@ ret_sec_string(krb5_storage *sp, int ucs2, struct sec_buffer *desc, char **s)
CHECK(krb5_storage_seek(sp, desc->offset, SEEK_SET), desc->offset);
CHECK(ret_string(sp, ucs2, desc->length, s), 0);
out:
return ret;
return ret;
}
static krb5_error_code
@@ -1029,7 +1029,7 @@ splitandenc(unsigned char *hash,
key[7] = (hash[6] << 1);
EVP_CIPHER_CTX_init(&ctx);
EVP_CipherInit_ex(&ctx, EVP_des_cbc(), NULL, key, NULL, 1);
EVP_Cipher(&ctx, answer, challenge, 8);
EVP_CIPHER_CTX_cleanup(&ctx);
@@ -1133,7 +1133,7 @@ heim_ntlm_v1_base_session(void *key, size_t len,
session->length = 0;
return ENOMEM;
}
m = EVP_MD_CTX_create();
if (m == NULL) {
heim_ntlm_free_buf(session);

View File

@@ -53,14 +53,14 @@ test_sasl_digest_md5(void)
abort();
if (heim_digest_parse_response(ctx, "charset=utf-8,username=\"chris\",realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",nc=00000001,cnonce=\"OA6MHXh6VqTrRk\",digest-uri=\"imap/elwood.innosoft.com\",response=d388dad90d4bbd760a152321f2143af7,qop=auth"))
abort();
if ((user = heim_digest_get_key(ctx, "username")) == NULL)
abort();
if (strcmp(user, "chris") != 0)
abort();
heim_digest_set_key(ctx, "password", "secret");
if (heim_digest_verify(ctx, &r))
abort();
@@ -95,14 +95,14 @@ test_http_digest_md5(void)
"response=\"1949323746fe6a43ef61f9606e7febea\","
"opaque=\"5ccc069c403ebaf9f0171e9517f40e41\""))
abort();
if ((user = heim_digest_get_key(ctx, "username")) == NULL)
abort();
if (strcmp(user, "Mufasa") != 0)
abort();
heim_digest_set_key(ctx, "password", "CircleOfLife");
if (heim_digest_verify(ctx, NULL))
abort();
@@ -158,7 +158,7 @@ test_cram_md5(void)
abort();
heim_cram_md5_export(secret, &state);
/* here you can store the memcpy-ed version of state somewhere else */
ctx = heim_cram_md5_import(&state, sizeof(state));
@@ -183,7 +183,7 @@ test_apop(void)
const char *resp = "c4c9334bac560ecc979e58001b3e22fb";
char *t;
t = heim_apop_create(chal, secret);
if (t == NULL)
abort();