diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/apputils/net-server.c | 46 | ||||
-rw-r--r-- | src/lib/crypto/builtin/des/f_tables.h | 22 | ||||
-rw-r--r-- | src/lib/crypto/crypto_tests/t_str2key.c | 56 | ||||
-rw-r--r-- | src/lib/crypto/krb/checksum_dk_cmac.c | 3 | ||||
-rw-r--r-- | src/lib/crypto/krb/cmac.c | 3 | ||||
-rw-r--r-- | src/lib/crypto/krb/t_fortuna.c | 2 | ||||
-rw-r--r-- | src/lib/crypto/nss/enc_provider/camellia.c | 2 | ||||
-rw-r--r-- | src/lib/crypto/nss/enc_provider/des.c | 6 | ||||
-rw-r--r-- | src/lib/crypto/nss/enc_provider/des3.c | 12 | ||||
-rw-r--r-- | src/lib/crypto/nss/enc_provider/enc_gen.c | 2 | ||||
-rw-r--r-- | src/lib/crypto/nss/hash_provider/hash_gen.c | 1 | ||||
-rw-r--r-- | src/lib/gssapi/generic/oid_ops.c | 2 | ||||
-rw-r--r-- | src/lib/gssapi/generic/util_buffer_set.c | 4 | ||||
-rw-r--r-- | src/lib/gssapi/krb5/iakerb.c | 2 | ||||
-rw-r--r-- | src/lib/gssapi/krb5/prf.c | 2 | ||||
-rw-r--r-- | src/lib/gssapi/krb5/store_cred.c | 2 | ||||
-rw-r--r-- | src/lib/kdb/t_stringattr.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/asn.1/asn1_encode.h | 22 | ||||
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode.h | 2 | ||||
-rw-r--r-- | src/lib/krb5/ccache/cc_dir.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/os/trace.c | 2 |
21 files changed, 99 insertions, 98 deletions
diff --git a/src/lib/apputils/net-server.c b/src/lib/apputils/net-server.c index 11a7c122f..9df909fac 100644 --- a/src/lib/apputils/net-server.c +++ b/src/lib/apputils/net-server.c @@ -465,24 +465,24 @@ free_socket(verto_ctx *ctx, verto_ev *ev) /* Free the connection struct. */ if (conn) { switch (conn->type) { - case CONN_RPC: - if (conn->rpc_force_close) { - FD_ZERO(&fds); - FD_SET(fd, &fds); - svc_getreqset(&fds); - if (FD_ISSET(fd, &svc_fdset)) { - krb5_klog_syslog(LOG_ERR, - _("descriptor %d closed but still " - "in svc_fdset"), - fd); - } + case CONN_RPC: + if (conn->rpc_force_close) { + FD_ZERO(&fds); + FD_SET(fd, &fds); + svc_getreqset(&fds); + if (FD_ISSET(fd, &svc_fdset)) { + krb5_klog_syslog(LOG_ERR, + _("descriptor %d closed but still " + "in svc_fdset"), + fd); } - /* Fall through. */ - case CONN_TCP: - tcp_or_rpc_data_counter--; - break; - default: - break; + } + /* Fall through. */ + case CONN_TCP: + tcp_or_rpc_data_counter--; + break; + default: + break; } free_connection(conn); @@ -873,7 +873,7 @@ setup_rpc_listener_ports(struct socksetup *data) return 0; } -#if defined(CMSG_SPACE) && defined(HAVE_STRUCT_CMSGHDR) && \ +#if defined(CMSG_SPACE) && defined(HAVE_STRUCT_CMSGHDR) && \ (defined(IP_PKTINFO) || defined(IPV6_PKTINFO)) union pktinfo { #ifdef HAVE_STRUCT_IN6_PKTINFO @@ -944,7 +944,7 @@ setup_udp_port_1(struct socksetup *data, struct sockaddr *addr, return 1; setnbio(sock); -#if !(defined(CMSG_SPACE) && defined(HAVE_STRUCT_CMSGHDR) && \ +#if !(defined(CMSG_SPACE) && defined(HAVE_STRUCT_CMSGHDR) && \ (defined(IP_PKTINFO) || defined(IPV6_PKTINFO))) assert(pktinfo == 0); #endif @@ -1652,7 +1652,7 @@ process_packet(verto_ctx *ctx, verto_ev *ev) * specific local address. This info probably should've been saved in * our socket data structure at setup time. */ - state->daddr_len = sizeof(state->daddr); + state->daddr_len = sizeof(state->daddr); if (getsockname(state->port_fd, (struct sockaddr *)&state->daddr, &state->daddr_len) != 0) state->daddr_len = 0; @@ -1886,7 +1886,7 @@ process_tcp_connection_read(verto_ctx *ctx, verto_ev *ev) krb5_error_code err; /* Message too big. */ krb5_klog_syslog(LOG_ERR, _("TCP client %s wants %lu bytes, " - "cap is %lu"), conn->addrbuf, + "cap is %lu"), conn->addrbuf, (unsigned long) conn->msglen, (unsigned long) conn->bufsiz - 4); /* XXX Should return an error. */ @@ -1894,7 +1894,7 @@ process_tcp_connection_read(verto_ctx *ctx, verto_ev *ev) &response); if (err) { krb5_klog_syslog(LOG_ERR, _("error constructing " - "KRB_ERR_FIELD_TOOLONG error! %s"), + "KRB_ERR_FIELD_TOOLONG error! %s"), error_message(err)); goto kill_tcp_connection; } @@ -2073,7 +2073,7 @@ accept_rpc_connection(verto_ctx *ctx, verto_ev *ev) } #if 0 krb5_klog_syslog(LOG_INFO, _("accepted RPC connection on socket %d " - "from %s"), s, newconn->addrbuf); + "from %s"), s, newconn->addrbuf); #endif newconn->addr_s = addr_s; diff --git a/src/lib/crypto/builtin/des/f_tables.h b/src/lib/crypto/builtin/des/f_tables.h index c0a99ea0b..a99eb0a14 100644 --- a/src/lib/crypto/builtin/des/f_tables.h +++ b/src/lib/crypto/builtin/des/f_tables.h @@ -101,17 +101,17 @@ extern const unsigned DES_INT32 des_SP_table[8][64]; * a time and swapping left and right in the code we can avoid the * swaps altogether. */ -#define DES_SP_ENCRYPT_ROUND(left, right, temp, kp) do { \ - (temp) = (((right) >> 11) | ((right) << 21)) ^ *(kp)++; \ - (left) ^= SP[0][((temp) >> 24) & 0x3f] \ - | SP[1][((temp) >> 16) & 0x3f] \ - | SP[2][((temp) >> 8) & 0x3f] \ - | SP[3][((temp) ) & 0x3f]; \ - (temp) = (((right) >> 23) | ((right) << 9)) ^ *(kp)++; \ - (left) ^= SP[4][((temp) >> 24) & 0x3f] \ - | SP[5][((temp) >> 16) & 0x3f] \ - | SP[6][((temp) >> 8) & 0x3f] \ - | SP[7][((temp) ) & 0x3f]; \ +#define DES_SP_ENCRYPT_ROUND(left, right, temp, kp) do { \ + (temp) = (((right) >> 11) | ((right) << 21)) ^ *(kp)++; \ + (left) ^= SP[0][((temp) >> 24) & 0x3f] \ + | SP[1][((temp) >> 16) & 0x3f] \ + | SP[2][((temp) >> 8) & 0x3f] \ + | SP[3][((temp) ) & 0x3f]; \ + (temp) = (((right) >> 23) | ((right) << 9)) ^ *(kp)++; \ + (left) ^= SP[4][((temp) >> 24) & 0x3f] \ + | SP[5][((temp) >> 16) & 0x3f] \ + | SP[6][((temp) >> 8) & 0x3f] \ + | SP[7][((temp) ) & 0x3f]; \ } while(0); #define DES_SP_DECRYPT_ROUND(left, right, temp, kp) do { \ diff --git a/src/lib/crypto/crypto_tests/t_str2key.c b/src/lib/crypto/crypto_tests/t_str2key.c index ff7c9b406..fe58bd11c 100644 --- a/src/lib/crypto/crypto_tests/t_str2key.c +++ b/src/lib/crypto/crypto_tests/t_str2key.c @@ -290,7 +290,7 @@ struct test { }, /* Test vectors from RFC 3962 appendix B. */ - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "password", "ATHENA.MIT.EDUraeburn", @@ -298,7 +298,7 @@ struct test { { KV5M_DATA, 16, "\x42\x26\x3C\x6E\x89\xF4\xFC\x28\xB8\xDF\x68\xEE\x09\x79\x9F\x15" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "password", "ATHENA.MIT.EDUraeburn", @@ -307,7 +307,7 @@ struct test { "\xFE\x69\x7B\x52\xBC\x0D\x3C\xE1\x44\x32\xBA\x03\x6A\x92\xE6\x5B" "\xBB\x52\x28\x09\x90\xA2\xFA\x27\x88\x39\x98\xD7\x2A\xF3\x01\x61" } }, - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "password", "ATHENA.MIT.EDUraeburn", @@ -315,7 +315,7 @@ struct test { { KV5M_DATA, 16, "\xC6\x51\xBF\x29\xE2\x30\x0A\xC2\x7F\xA4\x69\xD6\x93\xBD\xDA\x13" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "password", "ATHENA.MIT.EDUraeburn", @@ -324,7 +324,7 @@ struct test { "\xA2\xE1\x6D\x16\xB3\x60\x69\xC1\x35\xD5\xE9\xD2\xE2\x5F\x89\x61" "\x02\x68\x56\x18\xB9\x59\x14\xB4\x67\xC6\x76\x22\x22\x58\x24\xFF" } }, - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "password", "ATHENA.MIT.EDUraeburn", @@ -332,7 +332,7 @@ struct test { { KV5M_DATA, 16, "\x4C\x01\xCD\x46\xD6\x32\xD0\x1E\x6D\xBE\x23\x0A\x01\xED\x64\x2A" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "password", "ATHENA.MIT.EDUraeburn", @@ -341,7 +341,7 @@ struct test { "\x55\xA6\xAC\x74\x0A\xD1\x7B\x48\x46\x94\x10\x51\xE1\xE8\xB0\xA7" "\x54\x8D\x93\xB0\xAB\x30\xA8\xBC\x3F\xF1\x62\x80\x38\x2B\x8C\x2A" } }, - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "password", "\x12\x34\x56\x78\x78\x56\x34\x12", @@ -349,7 +349,7 @@ struct test { { KV5M_DATA, 16, "\xE9\xB2\x3D\x52\x27\x37\x47\xDD\x5C\x35\xCB\x55\xBE\x61\x9D\x8E" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "password", "\x12\x34\x56\x78\x78\x56\x34\x12", @@ -358,7 +358,7 @@ struct test { "\x97\xA4\xE7\x86\xBE\x20\xD8\x1A\x38\x2D\x5E\xBC\x96\xD5\x90\x9C" "\xAB\xCD\xAD\xC8\x7C\xA4\x8F\x57\x45\x04\x15\x9F\x16\xC3\x6E\x31" } }, - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase equals block size", @@ -366,7 +366,7 @@ struct test { { KV5M_DATA, 16, "\x59\xD1\xBB\x78\x9A\x82\x8B\x1A\xA5\x4E\xF9\xC2\x88\x3F\x69\xED" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase equals block size", @@ -375,7 +375,7 @@ struct test { "\x89\xAD\xEE\x36\x08\xDB\x8B\xC7\x1F\x1B\xFB\xFE\x45\x94\x86\xB0" "\x56\x18\xB7\x0C\xBA\xE2\x20\x92\x53\x4E\x56\xC5\x53\xBA\x4B\x34" } }, - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase exceeds block size", @@ -383,7 +383,7 @@ struct test { { KV5M_DATA, 16, "\xCB\x80\x05\xDC\x5F\x90\x17\x9A\x7F\x02\x10\x4C\x00\x18\x75\x1D" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase exceeds block size", @@ -392,7 +392,7 @@ struct test { "\xD7\x8C\x5C\x9C\xB8\x72\xA8\xC9\xDA\xD4\x69\x7F\x0B\xB5\xB2\xD2" "\x14\x96\xC8\x2B\xEB\x2C\xAE\xDA\x21\x12\xFC\xEE\xA0\x57\x40\x1B" } }, - { + { ENCTYPE_AES128_CTS_HMAC_SHA1_96, "\xF0\x9D\x84\x9E", "EXAMPLE.COMpianist", @@ -400,7 +400,7 @@ struct test { { KV5M_DATA, 16, "\xF1\x49\xC1\xF2\xE1\x54\xA7\x34\x52\xD4\x3E\x7F\xE6\x2A\x56\xE5" } }, - { + { ENCTYPE_AES256_CTS_HMAC_SHA1_96, "\xF0\x9D\x84\x9E", "EXAMPLE.COMpianist", @@ -412,7 +412,7 @@ struct test { #ifdef CAMELLIA /* The same inputs applied to Camellia enctypes. */ - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "password", "ATHENA.MIT.EDUraeburn", @@ -420,7 +420,7 @@ struct test { { KV5M_DATA, 16, "\x57\xD0\x29\x72\x98\xFF\xD9\xD3\x5D\xE5\xA4\x7F\xB4\xBD\xE2\x4B" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "password", "ATHENA.MIT.EDUraeburn", @@ -429,7 +429,7 @@ struct test { "\xB9\xD6\x82\x8B\x20\x56\xB7\xBE\x65\x6D\x88\xA1\x23\xB1\xFA\xC6" "\x82\x14\xAC\x2B\x72\x7E\xCF\x5F\x69\xAF\xE0\xC4\xDF\x2A\x6D\x2C" } }, - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "password", "ATHENA.MIT.EDUraeburn", @@ -437,7 +437,7 @@ struct test { { KV5M_DATA, 16, "\x73\xF1\xB5\x3A\xA0\xF3\x10\xF9\x3B\x1D\xE8\xCC\xAA\x0C\xB1\x52" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "password", "ATHENA.MIT.EDUraeburn", @@ -446,7 +446,7 @@ struct test { "\x83\xFC\x58\x66\xE5\xF8\xF4\xC6\xF3\x86\x63\xC6\x5C\x87\x54\x9F" "\x34\x2B\xC4\x7E\xD3\x94\xDC\x9D\x3C\xD4\xD1\x63\xAD\xE3\x75\xE3" } }, - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "password", "ATHENA.MIT.EDUraeburn", @@ -454,7 +454,7 @@ struct test { { KV5M_DATA, 16, "\x8E\x57\x11\x45\x45\x28\x55\x57\x5F\xD9\x16\xE7\xB0\x44\x87\xAA" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "password", "ATHENA.MIT.EDUraeburn", @@ -463,7 +463,7 @@ struct test { "\x77\xF4\x21\xA6\xF2\x5E\x13\x83\x95\xE8\x37\xE5\xD8\x5D\x38\x5B" "\x4C\x1B\xFD\x77\x2E\x11\x2C\xD9\x20\x8C\xE7\x2A\x53\x0B\x15\xE6" } }, - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "password", "\x12\x34\x56\x78\x78\x56\x34\x12", @@ -471,7 +471,7 @@ struct test { { KV5M_DATA, 16, "\x00\x49\x8F\xD9\x16\xBF\xC1\xC2\xB1\x03\x1C\x17\x08\x01\xB3\x81" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "password", "\x12\x34\x56\x78\x78\x56\x34\x12", @@ -480,7 +480,7 @@ struct test { "\x11\x08\x3A\x00\xBD\xFE\x6A\x41\xB2\xF1\x97\x16\xD6\x20\x2F\x0A" "\xFA\x94\x28\x9A\xFE\x8B\x27\xA0\x49\xBD\x28\xB1\xD7\x6C\x38\x9A" } }, - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase equals block size", @@ -488,7 +488,7 @@ struct test { { KV5M_DATA, 16, "\x8B\xF6\xC3\xEF\x70\x9B\x98\x1D\xBB\x58\x5D\x08\x68\x43\xBE\x05" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase equals block size", @@ -497,7 +497,7 @@ struct test { "\x11\x9F\xE2\xA1\xCB\x0B\x1B\xE0\x10\xB9\x06\x7A\x73\xDB\x63\xED" "\x46\x65\xB4\xE5\x3A\x98\xD1\x78\x03\x5D\xCF\xE8\x43\xA6\xB9\xB0" } }, - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase exceeds block size", @@ -505,7 +505,7 @@ struct test { { KV5M_DATA, 16, "\x57\x52\xAC\x8D\x6A\xD1\xCC\xFE\x84\x30\xB3\x12\x87\x1C\x2F\x74" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "pass phrase exceeds block size", @@ -514,7 +514,7 @@ struct test { "\x61\x4D\x5D\xFC\x0B\xA6\xD3\x90\xB4\x12\xB8\x9A\xE4\xD5\xB0\x88" "\xB6\x12\xB3\x16\x51\x09\x94\x67\x9D\xDB\x43\x83\xC7\x12\x6D\xDF" } }, - { + { ENCTYPE_CAMELLIA128_CTS_CMAC, "\xf0\x9d\x84\x9e", "EXAMPLE.COMpianist", @@ -522,7 +522,7 @@ struct test { { KV5M_DATA, 16, "\xCC\x75\xC7\xFD\x26\x0F\x1C\x16\x58\x01\x1F\xCC\x0D\x56\x06\x16" } }, - { + { ENCTYPE_CAMELLIA256_CTS_CMAC, "\xf0\x9d\x84\x9e", "EXAMPLE.COMpianist", diff --git a/src/lib/crypto/krb/checksum_dk_cmac.c b/src/lib/crypto/krb/checksum_dk_cmac.c index 2e9a15ec8..bb48c577c 100644 --- a/src/lib/crypto/krb/checksum_dk_cmac.c +++ b/src/lib/crypto/krb/checksum_dk_cmac.c @@ -1,3 +1,4 @@ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* lib/crypto/krb/checksum_dk_cmac.c */ /* * Copyright 2010 by the Massachusetts Institute of Technology. @@ -7,7 +8,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright diff --git a/src/lib/crypto/krb/cmac.c b/src/lib/crypto/krb/cmac.c index ba22ebdee..19af2201e 100644 --- a/src/lib/crypto/krb/cmac.c +++ b/src/lib/crypto/krb/cmac.c @@ -1,3 +1,4 @@ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* lib/crypto/krb/cmac.c */ /* * Copyright 2010 by the Massachusetts Institute of Technology. @@ -7,7 +8,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright diff --git a/src/lib/crypto/krb/t_fortuna.c b/src/lib/crypto/krb/t_fortuna.c index 9ab7e499c..4f25bee62 100644 --- a/src/lib/crypto/krb/t_fortuna.c +++ b/src/lib/crypto/krb/t_fortuna.c @@ -100,7 +100,7 @@ head_tail_test(struct fortuna_state *st) c = c >> 1; } } - + for (bit = 0; bit < 8; bit++) { res = ((double)abs(len - bits[bit] * 2)) / (double)len; if (res > 0.005){ diff --git a/src/lib/crypto/nss/enc_provider/camellia.c b/src/lib/crypto/nss/enc_provider/camellia.c index 4606f8db0..f4eb0deb7 100644 --- a/src/lib/crypto/nss/enc_provider/camellia.c +++ b/src/lib/crypto/nss/enc_provider/camellia.c @@ -83,7 +83,7 @@ krb5int_camellia_cbc_mac(krb5_key key, const krb5_crypto_iov *data, */ static krb5_error_code camellia_init_state(const krb5_keyblock *key, krb5_keyusage usage, - krb5_data *state) + krb5_data *state) { state->length = 16; state->data = (void *) malloc(16); diff --git a/src/lib/crypto/nss/enc_provider/des.c b/src/lib/crypto/nss/enc_provider/des.c index 2d9387f19..3b96617a8 100644 --- a/src/lib/crypto/nss/enc_provider/des.c +++ b/src/lib/crypto/nss/enc_provider/des.c @@ -51,9 +51,9 @@ k5_des_encrypt_iov(krb5_key key, const krb5_data *ivec, static krb5_error_code k5_des_decrypt_iov(krb5_key key, - const krb5_data *ivec, - krb5_crypto_iov *data, - size_t num_data) + const krb5_data *ivec, + krb5_crypto_iov *data, + size_t num_data) { krb5_error_code ret; diff --git a/src/lib/crypto/nss/enc_provider/des3.c b/src/lib/crypto/nss/enc_provider/des3.c index b57294580..de3f3c91e 100644 --- a/src/lib/crypto/nss/enc_provider/des3.c +++ b/src/lib/crypto/nss/enc_provider/des3.c @@ -53,13 +53,13 @@ static krb5_error_code k5_des3_decrypt_iov(krb5_key key, const krb5_data *ivec, krb5_crypto_iov *data, size_t num_data) { - krb5_error_code ret; + krb5_error_code ret; - ret = k5_nss_gen_import(key, CKM_DES3_CBC, CKA_DECRYPT); - if (ret != 0) - return ret; - return k5_nss_gen_block_iov(key, CKM_DES3_CBC, CKA_DECRYPT, - ivec, data, num_data); + ret = k5_nss_gen_import(key, CKM_DES3_CBC, CKA_DECRYPT); + if (ret != 0) + return ret; + return k5_nss_gen_block_iov(key, CKM_DES3_CBC, CKA_DECRYPT, + ivec, data, num_data); } const struct krb5_enc_provider krb5int_enc_des3 = { diff --git a/src/lib/crypto/nss/enc_provider/enc_gen.c b/src/lib/crypto/nss/enc_provider/enc_gen.c index ed016635e..b7dc06d82 100644 --- a/src/lib/crypto/nss/enc_provider/enc_gen.c +++ b/src/lib/crypto/nss/enc_provider/enc_gen.c @@ -515,7 +515,7 @@ k5_nss_gen_cts_iov(krb5_key krb_key, CK_MECHANISM_TYPE mech, if (operation == CKA_DECRYPT) { /* block1 now has p'n xor cn-1 */ xor(block1, recover1, blocksize); - /* block 1 now has pn-1 */ + /* block 1 now has pn-1 */ } else { if (ivec && ivec->data) { memcpy(ivec->data, block1, blocksize); diff --git a/src/lib/crypto/nss/hash_provider/hash_gen.c b/src/lib/crypto/nss/hash_provider/hash_gen.c index 7e54ccce9..9364a6cec 100644 --- a/src/lib/crypto/nss/hash_provider/hash_gen.c +++ b/src/lib/crypto/nss/hash_provider/hash_gen.c @@ -72,4 +72,3 @@ k5_nss_gen_hash(HASH_HashType hashType, const krb5_crypto_iov *data, return 0; } - diff --git a/src/lib/gssapi/generic/oid_ops.c b/src/lib/gssapi/generic/oid_ops.c index f507ccdc1..535fe57d8 100644 --- a/src/lib/gssapi/generic/oid_ops.c +++ b/src/lib/gssapi/generic/oid_ops.c @@ -156,7 +156,7 @@ generic_gss_add_oid_set_member(OM_uint32 *minor_status, elist = (*oid_set)->elements; /* Get an enlarged copy of the array */ if (((*oid_set)->elements = (gss_OID) gssalloc_malloc(((*oid_set)->count+1) * - sizeof(gss_OID_desc)))) { + sizeof(gss_OID_desc)))) { /* Copy in the old junk */ if (elist) memcpy((*oid_set)->elements, diff --git a/src/lib/gssapi/generic/util_buffer_set.c b/src/lib/gssapi/generic/util_buffer_set.c index 5cc3e15dc..f7472a080 100644 --- a/src/lib/gssapi/generic/util_buffer_set.c +++ b/src/lib/gssapi/generic/util_buffer_set.c @@ -72,8 +72,8 @@ generic_gss_add_buffer_set_member(OM_uint32 * minor_status, set = *buffer_set; set->elements = (gss_buffer_desc *)gssalloc_realloc(set->elements, - (set->count + 1) * - sizeof(gss_buffer_desc)); + (set->count + 1) * + sizeof(gss_buffer_desc)); if (set->elements == NULL) { *minor_status = ENOMEM; return GSS_S_FAILURE; diff --git a/src/lib/gssapi/krb5/iakerb.c b/src/lib/gssapi/krb5/iakerb.c index 84a96ac1b..005c3fca3 100644 --- a/src/lib/gssapi/krb5/iakerb.c +++ b/src/lib/gssapi/krb5/iakerb.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2009 by the Massachusetts Institute of Technology. * All Rights Reserved. diff --git a/src/lib/gssapi/krb5/prf.c b/src/lib/gssapi/krb5/prf.c index 6fd34e954..a0fbcdab0 100644 --- a/src/lib/gssapi/krb5/prf.c +++ b/src/lib/gssapi/krb5/prf.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* lib/gssapi/krb5/prf.c */ /* * Copyright 2009 by the Massachusetts Institute of Technology. diff --git a/src/lib/gssapi/krb5/store_cred.c b/src/lib/gssapi/krb5/store_cred.c index 5b4dfe8f7..bff3cdefe 100644 --- a/src/lib/gssapi/krb5/store_cred.c +++ b/src/lib/gssapi/krb5/store_cred.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* lib/gssapi/krb5/store_cred.c */ /* * Copyright 2009 by the Massachusetts Institute of Technology. diff --git a/src/lib/kdb/t_stringattr.c b/src/lib/kdb/t_stringattr.c index a04486e87..a153f7c2d 100644 --- a/src/lib/kdb/t_stringattr.c +++ b/src/lib/kdb/t_stringattr.c @@ -33,7 +33,7 @@ * * - The APIs will work on a DB entry initialized to all zeros (because it has * an empty tl_data list). - * + * * - Attribute order in krb5_dbe_get_strings matches attribute insertion order. */ diff --git a/src/lib/krb5/asn.1/asn1_encode.h b/src/lib/krb5/asn.1/asn1_encode.h index 2e0b9939c..530d318f0 100644 --- a/src/lib/krb5/asn.1/asn1_encode.h +++ b/src/lib/krb5/asn.1/asn1_encode.h @@ -299,7 +299,7 @@ struct atype_info { const struct field_info *field; /* atype_tagged_thing */ unsigned int tagval : 8, tagtype : 8, construction:8; - /* atype_[u]int */ + /* atype_[u]int */ asn1_intmax (*loadint)(const void *); asn1_uintmax (*loaduint)(const void *); }; @@ -411,16 +411,16 @@ struct atype_info { atype_int, sizeof(CTYPENAME), 0, 0, 0, 0, 0, 0, 0, 0, 0, \ loadint_##DESCNAME, 0, \ } -#define DEFUINTTYPE(DESCNAME, CTYPENAME) \ - typedef CTYPENAME aux_typedefname_##DESCNAME; \ - static asn1_uintmax loaduint_##DESCNAME(const void *p) \ - { \ - assert(sizeof(CTYPENAME) <= sizeof(asn1_uintmax)); \ - return *(const aux_typedefname_##DESCNAME *)p; \ - } \ - const struct atype_info krb5int_asn1type_##DESCNAME = { \ - atype_uint, sizeof(CTYPENAME), 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, loaduint_##DESCNAME, \ +#define DEFUINTTYPE(DESCNAME, CTYPENAME) \ + typedef CTYPENAME aux_typedefname_##DESCNAME; \ + static asn1_uintmax loaduint_##DESCNAME(const void *p) \ + { \ + assert(sizeof(CTYPENAME) <= sizeof(asn1_uintmax)); \ + return *(const aux_typedefname_##DESCNAME *)p; \ + } \ + const struct atype_info krb5int_asn1type_##DESCNAME = { \ + atype_uint, sizeof(CTYPENAME), 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, loaduint_##DESCNAME, \ } /* Pointers to other types, to be encoded as those other types. */ #ifdef POINTERS_ARE_ALL_THE_SAME diff --git a/src/lib/krb5/asn.1/asn1_k_decode.h b/src/lib/krb5/asn.1/asn1_k_decode.h index c19fe83ed..7ce32956c 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.h +++ b/src/lib/krb5/asn.1/asn1_k_decode.h @@ -279,7 +279,7 @@ asn1_error_code asn1_decode_iakerb_finished(asn1buf *buf, asn1_error_code asn1_decode_kdf_alg_id(asn1buf *buf, krb5_octet_data *val); - asn1_error_code +asn1_error_code asn1_decode_sequence_of_kdf_alg_id(asn1buf *buf, krb5_octet_data ***val); diff --git a/src/lib/krb5/ccache/cc_dir.c b/src/lib/krb5/ccache/cc_dir.c index 83427860f..d77cce45b 100644 --- a/src/lib/krb5/ccache/cc_dir.c +++ b/src/lib/krb5/ccache/cc_dir.c @@ -451,7 +451,7 @@ dcc_retrieve(krb5_context context, krb5_ccache cache, krb5_flags flags, dcc_data *data = cache->data; return krb5_fcc_ops.retrieve(context, data->fcc, flags, mcreds, - creds); + creds); } static krb5_error_code KRB5_CALLCONV diff --git a/src/lib/krb5/os/trace.c b/src/lib/krb5/os/trace.c index 36aad31fa..309ffa154 100644 --- a/src/lib/krb5/os/trace.c +++ b/src/lib/krb5/os/trace.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* lib/krb5/os/trace.c - k5trace implementation */ /* * Copyright 2009 by the Massachusetts Institute of Technology. |