From 449598819d0e51355473c90682dd397dc305e5d0 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 17 Oct 2011 19:11:01 +0000 Subject: [PATCH] Make reindent Also fix pkinit_crypto_nss.c struct initializers and add parens to a ternary operator in do_as_req.c for better indentation. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25362 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-trace.h | 6 +- src/include/krb5/krb5.hin | 27 +- src/kadmin/cli/kadmin.c | 2 +- src/kdc/do_as_req.c | 11 +- src/kdc/kdc_preauth.c | 2 +- src/lib/apputils/net-server.c | 46 +- src/lib/crypto/builtin/des/f_tables.h | 22 +- src/lib/crypto/crypto_tests/t_str2key.c | 56 +- src/lib/crypto/krb/checksum_dk_cmac.c | 3 +- src/lib/crypto/krb/cmac.c | 3 +- src/lib/crypto/krb/t_fortuna.c | 2 +- src/lib/crypto/nss/enc_provider/camellia.c | 2 +- src/lib/crypto/nss/enc_provider/des.c | 6 +- src/lib/crypto/nss/enc_provider/des3.c | 12 +- src/lib/crypto/nss/enc_provider/enc_gen.c | 2 +- src/lib/crypto/nss/hash_provider/hash_gen.c | 1 - src/lib/gssapi/generic/oid_ops.c | 2 +- src/lib/gssapi/generic/util_buffer_set.c | 4 +- src/lib/gssapi/krb5/iakerb.c | 2 +- src/lib/gssapi/krb5/prf.c | 2 +- src/lib/gssapi/krb5/store_cred.c | 2 +- src/lib/kdb/t_stringattr.c | 2 +- src/lib/krb5/asn.1/asn1_encode.h | 22 +- src/lib/krb5/asn.1/asn1_k_decode.h | 2 +- src/lib/krb5/ccache/cc_dir.c | 2 +- src/lib/krb5/os/trace.c | 2 +- src/plugins/preauth/pkinit/pkinit_clnt.c | 4 +- .../preauth/pkinit/pkinit_crypto_nss.c | 657 +++++++++--------- .../preauth/pkinit/pkinit_kdf_constants.c | 4 +- src/plugins/preauth/pkinit/pkinit_srv.c | 2 +- src/tests/gssapi/t_accname.c | 8 +- src/tests/gssapi/t_ccselect.c | 10 +- src/tests/gssapi/t_gssexts.c | 44 +- src/tests/gssapi/t_imp_cred.c | 10 +- src/tests/gssapi/t_saslname.c | 42 +- src/tests/gssapi/t_spnego.c | 48 +- src/util/support/gettimeofday.c | 10 +- 37 files changed, 546 insertions(+), 538 deletions(-) diff --git a/src/include/k5-trace.h b/src/include/k5-trace.h index 8bf88e417..8b81a59ca 100644 --- a/src/include/k5-trace.h +++ b/src/include/k5-trace.h @@ -134,14 +134,14 @@ #define TRACE_CCSELECT_MODFAIL(c, name, ret, server) \ TRACE(c, (c, "ccselect module {str} yielded error {kerr} for server " \ "principal {princ}", name, ret, server)) -#define TRACE_CCSELECT_NOTFOUND(c, server) \ - TRACE(c, (c, "ccselect can't find appropriate cache for server " \ +#define TRACE_CCSELECT_NOTFOUND(c, server) \ + TRACE(c, (c, "ccselect can't find appropriate cache for server " \ "principal {princ}", server)) #define TRACE_CCSELECT_DEFAULT(c, cache, server) \ TRACE(c, (c, "ccselect choosing default cache {ccache} for server " \ "principal {princ}", cache, server)) -#define TRACE_FAST_ARMOR_CCACHE(c, ccache_name) \ +#define TRACE_FAST_ARMOR_CCACHE(c, ccache_name) \ TRACE(c, (c, "FAST armor ccache: {str}", ccache_name)) #define TRACE_FAST_ARMOR_CCACHE_KEY(c, keyblock) \ TRACE(c, (c, "Armor ccache sesion key: {keyblock}", keyblock)) diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index 2e5acd43f..d3829791d 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -463,9 +463,9 @@ typedef struct _krb5_crypto_iov { #define CKSUMTYPE_NIST_SHA 0x0009 #define CKSUMTYPE_HMAC_SHA1_DES3 0x000c #define CKSUMTYPE_HMAC_SHA1_96_AES128 0x000f /**< RFC 3962. Used with - ENCTYPE_AES128_CTS_HMAC_SHA1_96 */ + ENCTYPE_AES128_CTS_HMAC_SHA1_96 */ #define CKSUMTYPE_HMAC_SHA1_96_AES256 0x0010 /**< RFC 3962. Used with - ENCTYPE_AES256_CTS_HMAC_SHA1_96 */ + ENCTYPE_AES256_CTS_HMAC_SHA1_96 */ #define CKSUMTYPE_MD5_HMAC_ARCFOUR -137 /*Microsoft netlogon cksumtype*/ #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /*Microsoft md5 hmac cksumtype*/ @@ -1043,8 +1043,8 @@ krb5_c_is_keyed_cksum(krb5_cksumtype ctype); #define KRB5_CRYPTO_TYPE_TRAILER 5 /**< [out] checksum for encrypt */ #define KRB5_CRYPTO_TYPE_CHECKSUM 6 /**< [out] checksum for MIC */ #define KRB5_CRYPTO_TYPE_STREAM 7 /**< [in] entire message without - decomposing the structure into - header, data and trailer buffers */ + decomposing the structure into + header, data and trailer buffers */ /** @} */ /* end of KRB5_CRYPTO_TYPE group */ /** @@ -1655,12 +1655,12 @@ krb5_verify_checksum(krb5_context context, krb5_cksumtype ctype, #define AP_OPTS_RESERVED 0x80000000 #define AP_OPTS_USE_SESSION_KEY 0x40000000 /**< Use session key */ #define AP_OPTS_MUTUAL_REQUIRED 0x20000000 /**< Perform a mutual - authentication exchange */ + authentication exchange */ #define AP_OPTS_ETYPE_NEGOTIATION 0x00000002 #define AP_OPTS_USE_SUBKEY 0x00000001 /**< Generate a subsession key - from the current session key - obtained from the - credentials */ + from the current session key + obtained from the + credentials */ /* #define AP_OPTS_RESERVED 0x10000000 */ /* #define AP_OPTS_RESERVED 0x08000000 */ /* #define AP_OPTS_RESERVED 0x04000000 */ @@ -1873,8 +1873,8 @@ krb5_verify_checksum(krb5_context context, krb5_cksumtype ctype, /** Ticket start time, end time, and renewal duration. */ typedef struct _krb5_ticket_times { krb5_timestamp authtime; /**< Time at which KDC issued the initial ticket that corresponds to this ticket */ - /* XXX ? should ktime in KDC_REP == authtime - in ticket? otherwise client can't get this */ + /* XXX ? should ktime in KDC_REP == authtime + in ticket? otherwise client can't get this */ krb5_timestamp starttime; /**< optional in ticket, if not present, use @a authtime */ krb5_timestamp endtime; /**< Ticket expiration time */ krb5_timestamp renew_till; /**< Latest time at which renewal of ticket can be valid */ @@ -1895,7 +1895,7 @@ typedef struct _krb5_transited { krb5_data tr_contents; /**< Contents */ } krb5_transited; - /** Encrypted part of ticket. */ +/** Encrypted part of ticket. */ typedef struct _krb5_enc_tkt_part { krb5_magic magic; /* to-be-encrypted portion */ @@ -3425,7 +3425,7 @@ krb5_parse_name(krb5_context context, const char *name, krb5_principal *nprincip #define KRB5_PRINCIPAL_PARSE_NO_REALM 0x1 /**< Error if realm is present */ #define KRB5_PRINCIPAL_PARSE_REQUIRE_REALM 0x2 /**< Error if realm is not present */ #define KRB5_PRINCIPAL_PARSE_ENTERPRISE 0x4 /**< Create single-component - enterprise principle */ + enterprise principle */ /** * Convert a string principal name to a krb5_principal with flags @@ -7211,7 +7211,7 @@ krb5_set_error_message(krb5_context ctx, krb5_error_code code, const char *fmt, */ void KRB5_CALLCONV krb5_vset_error_message(krb5_context ctx, krb5_error_code code, - const char *fmt, va_list args) + const char *fmt, va_list args) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 3, 0))) #endif @@ -7588,4 +7588,3 @@ KRB5INT_END_DECLS #undef KRB5_ATTR_DEPRECATED #endif /* KRB5_GENERAL__ */ - diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 539091f84..a4cf7b49c 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -1142,7 +1142,7 @@ kadmin_addprinc_usage() "\t\t[-kvno kvno] [-policy policy] [-clearpolicy] [-randkey]\n" "\t\t[-pw password] [-maxrenewlife maxrenewlife]\n" "\t\t[-e keysaltlist]\n\t\t[{+|-}attribute]\n") - ); + ); fprintf(stderr, _("\tattributes are:\n")); fprintf(stderr, _("\t\tallow_postdated allow_forwardable allow_tgs_req " diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 15263b348..9031b03aa 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -360,9 +360,8 @@ egress: errcode = prepare_error_as(state->rstate, state->request, errcode, state->e_data, state->typed_e_data, - (state->client != NULL) ? - state->client->princ : - NULL, + ((state->client != NULL) ? + state->client->princ : NULL), &response, state->status); state->status = 0; } @@ -657,9 +656,9 @@ process_as_req(krb5_kdc_req *request, krb5_data *req_pkt, if (isflagset(s_flags, KRB5_KDB_FLAG_CANONICALIZE) && krb5_is_tgs_principal(state->request->server) && krb5_is_tgs_principal(state->server->princ)) { - state->ticket_reply.server = state->server->princ; + state->ticket_reply.server = state->server->princ; } else { - state->ticket_reply.server = state->request->server; + state->ticket_reply.server = state->request->server; } state->enc_tkt_reply.flags = 0; @@ -751,7 +750,7 @@ process_as_req(krb5_kdc_req *request, krb5_data *req_pkt, krb5_anonymous_principal())) { errcode = KRB5KDC_ERR_BADOPTION; state->status = "Anonymous requested but anonymous " - "principal not used."; + "principal not used."; goto errout; } setflag(state->enc_tkt_reply.flags, TKT_FLG_ANONYMOUS); diff --git a/src/kdc/kdc_preauth.c b/src/kdc/kdc_preauth.c index 93fddd775..bf1017f52 100644 --- a/src/kdc/kdc_preauth.c +++ b/src/kdc/kdc_preauth.c @@ -853,7 +853,7 @@ get_preauth_hint_list(krb5_kdc_req *request, krb5_kdcpreauth_rock rock, return; } state->hw_only = isflagset(rock->client->attributes, - KRB5_KDB_REQUIRES_HW_AUTH); + KRB5_KDB_REQUIRES_HW_AUTH); state->respond = respond; state->arg = arg; state->request = request; 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. diff --git a/src/plugins/preauth/pkinit/pkinit_clnt.c b/src/plugins/preauth/pkinit/pkinit_clnt.c index 6155b1063..2e5afef75 100644 --- a/src/plugins/preauth/pkinit/pkinit_clnt.c +++ b/src/plugins/preauth/pkinit/pkinit_clnt.c @@ -813,11 +813,11 @@ pkinit_as_rep_parse(krb5_context context, goto cleanup; } - /* ...otherwise, use the older octetstring2key function. */ + /* ...otherwise, use the older octetstring2key function. */ } else { retval = pkinit_octetstring2key(context, etype, client_key, - client_key_len, key_block); + client_key_len, key_block); if (retval) { pkiDebug("failed to create key pkinit_octetstring2key %s\n", error_message(retval)); diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c index 4b97d08f8..7955324f7 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c @@ -1,23 +1,24 @@ -/* +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* * Copyright (c) 2006,2007,2010,2011 Red Hat, 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: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * * 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. - * + * * * Neither the name of Red Hat, Inc., 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A @@ -153,28 +154,28 @@ struct dh_parameters { }; static const SEC_ASN1Template dh_parameters_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct dh_parameters), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct dh_parameters), }, { - SEC_ASN1_INTEGER, - offsetof(struct dh_parameters, p), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct dh_parameters, p), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER, - offsetof(struct dh_parameters, g), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct dh_parameters, g), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, - offsetof(struct dh_parameters, private_value_length), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, + offsetof(struct dh_parameters, private_value_length), + &SEC_IntegerTemplate, + sizeof(SECItem), }, {0, 0, NULL, 0} }; @@ -185,22 +186,22 @@ struct validation_parms { }; static const SEC_ASN1Template validation_parms_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct validation_parms), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct validation_parms), }, { - SEC_ASN1_BIT_STRING, - offsetof(struct validation_parms, seed), - &SEC_BitStringTemplate, - sizeof(SECItem), + SEC_ASN1_BIT_STRING, + offsetof(struct validation_parms, seed), + &SEC_BitStringTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER, - offsetof(struct validation_parms, pgen_counter), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct validation_parms, pgen_counter), + &SEC_IntegerTemplate, + sizeof(SECItem), }, {0, 0, NULL, 0} }; @@ -209,40 +210,40 @@ static const SEC_ASN1Template validation_parms_template[] = { struct domain_parameters; static const SEC_ASN1Template domain_parameters_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct domain_parameters), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct domain_parameters), }, { - SEC_ASN1_INTEGER, - offsetof(struct domain_parameters, p), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct domain_parameters, p), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER, - offsetof(struct domain_parameters, g), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct domain_parameters, g), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER, - offsetof(struct domain_parameters, q), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct domain_parameters, q), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, - offsetof(struct domain_parameters, j), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, + offsetof(struct domain_parameters, j), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INLINE | SEC_ASN1_POINTER | SEC_ASN1_OPTIONAL, - offsetof(struct domain_parameters, validation_parms), - &validation_parms_template, - sizeof(struct validation_parms *), + SEC_ASN1_INLINE | SEC_ASN1_POINTER | SEC_ASN1_OPTIONAL, + offsetof(struct domain_parameters, validation_parms), + &validation_parms_template, + sizeof(struct validation_parms *), }, {0, 0, NULL, 0} }; @@ -254,22 +255,22 @@ struct issuer_and_serial_number { }; static const SEC_ASN1Template issuer_and_serial_number_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct issuer_and_serial_number), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct issuer_and_serial_number), }, { - SEC_ASN1_ANY, - offsetof(struct issuer_and_serial_number, issuer), - &SEC_AnyTemplate, - sizeof(SECItem), + SEC_ASN1_ANY, + offsetof(struct issuer_and_serial_number, issuer), + &SEC_AnyTemplate, + sizeof(SECItem), }, { - SEC_ASN1_INTEGER, - offsetof(struct issuer_and_serial_number, serial), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_INTEGER, + offsetof(struct issuer_and_serial_number, serial), + &SEC_IntegerTemplate, + sizeof(SECItem), }, {0, 0, NULL, 0} }; @@ -277,10 +278,10 @@ static const SEC_ASN1Template issuer_and_serial_number_template[] = { /* KerberosString: RFC 4120, 5.2.1. */ static const SEC_ASN1Template kerberos_string_template[] = { { - SEC_ASN1_GENERAL_STRING, - 0, - NULL, - sizeof(SECItem), + SEC_ASN1_GENERAL_STRING, + 0, + NULL, + sizeof(SECItem), } }; @@ -290,20 +291,20 @@ struct realm { }; static const SEC_ASN1Template realm_template[] = { { - SEC_ASN1_GENERAL_STRING, - 0, - NULL, - sizeof(SECItem), + SEC_ASN1_GENERAL_STRING, + 0, + NULL, + sizeof(SECItem), } }; /* PrincipalName: RFC 4120, 5.2.2. */ static const SEC_ASN1Template sequence_of_kerberos_string_template[] = { { - SEC_ASN1_SEQUENCE_OF, - 0, - &kerberos_string_template, - 0, + SEC_ASN1_SEQUENCE_OF, + 0, + &kerberos_string_template, + 0, } }; @@ -313,22 +314,22 @@ struct principal_name { }; static const SEC_ASN1Template principal_name_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct principal_name), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct principal_name), }, { - SEC_ASN1_CONTEXT_SPECIFIC | 0 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, - offsetof(struct principal_name, name_type), - &SEC_IntegerTemplate, - sizeof(SECItem), + SEC_ASN1_CONTEXT_SPECIFIC | 0 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, + offsetof(struct principal_name, name_type), + &SEC_IntegerTemplate, + sizeof(SECItem), }, { - SEC_ASN1_CONTEXT_SPECIFIC | 1 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, - offsetof(struct principal_name, name_string), - sequence_of_kerberos_string_template, - sizeof(struct SECItem **), + SEC_ASN1_CONTEXT_SPECIFIC | 1 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, + offsetof(struct principal_name, name_string), + sequence_of_kerberos_string_template, + sizeof(struct SECItem **), }, {0, 0, NULL, 0}, }; @@ -340,22 +341,22 @@ struct kerberos_principal_name { }; static const SEC_ASN1Template kerberos_principal_name_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct kerberos_principal_name), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct kerberos_principal_name), }, { - SEC_ASN1_CONTEXT_SPECIFIC | 0 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, - offsetof(struct kerberos_principal_name, realm), - &realm_template, - sizeof(struct realm), + SEC_ASN1_CONTEXT_SPECIFIC | 0 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, + offsetof(struct kerberos_principal_name, realm), + &realm_template, + sizeof(struct realm), }, { - SEC_ASN1_CONTEXT_SPECIFIC | 1 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, - offsetof(struct kerberos_principal_name, principal_name), - &principal_name_template, - sizeof(struct principal_name), + SEC_ASN1_CONTEXT_SPECIFIC | 1 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, + offsetof(struct kerberos_principal_name, principal_name), + &principal_name_template, + sizeof(struct principal_name), }, {0, 0, NULL, 0} }; @@ -366,57 +367,62 @@ struct content_info { }; static const SEC_ASN1Template content_info_template[] = { { - SEC_ASN1_SEQUENCE, - 0, - NULL, - sizeof(struct content_info), + SEC_ASN1_SEQUENCE, + 0, + NULL, + sizeof(struct content_info), }, { - SEC_ASN1_OBJECT_ID, - offsetof(struct content_info, content_type), - &SEC_ObjectIDTemplate, - sizeof(SECItem), + SEC_ASN1_OBJECT_ID, + offsetof(struct content_info, content_type), + &SEC_ObjectIDTemplate, + sizeof(SECItem), }, { - SEC_ASN1_CONTEXT_SPECIFIC | 0 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, - offsetof(struct content_info, content), - &SEC_OctetStringTemplate, - sizeof(SECItem), + SEC_ASN1_CONTEXT_SPECIFIC | 0 | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT, + offsetof(struct content_info, content), + &SEC_OctetStringTemplate, + sizeof(SECItem), }, {0, 0, NULL, 0} }; /* OIDs. */ -static unsigned char oid_pkinit_key_purpose_client_bytes[] = - { 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x04 }; +static unsigned char oid_pkinit_key_purpose_client_bytes[] = { + 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x04 +}; static SECItem pkinit_kp_client = { siDEROID, oid_pkinit_key_purpose_client_bytes, 7, }; -static unsigned char oid_pkinit_key_purpose_kdc_bytes[] = - { 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x05 }; +static unsigned char oid_pkinit_key_purpose_kdc_bytes[] = { + 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x05 +}; static SECItem pkinit_kp_kdc = { siDEROID, oid_pkinit_key_purpose_kdc_bytes, 7, }; -static unsigned char oid_ms_sc_login_key_purpose_bytes[] = - { 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x14, 0x02, 0x02 }; +static unsigned char oid_ms_sc_login_key_purpose_bytes[] = { + 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x14, 0x02, 0x02 +}; static SECItem pkinit_kp_mssclogin = { siDEROID, oid_ms_sc_login_key_purpose_bytes, 10, }; -static unsigned char oid_pkinit_name_type_principal_bytes[] = - { 0x2b, 0x06, 0x01, 0x05, 0x02, 0x02 }; +static unsigned char oid_pkinit_name_type_principal_bytes[] = { + 0x2b, 0x06, 0x01, 0x05, 0x02, 0x02 +}; static SECItem pkinit_nt_principal = { siDEROID, oid_pkinit_name_type_principal_bytes, 6, }; -static unsigned char oid_pkinit_name_type_upn_bytes[] = - { 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x14, 0x02, 0x03 }; +static unsigned char oid_pkinit_name_type_upn_bytes[] = { + 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x14, 0x02, 0x03 +}; static SECItem pkinit_nt_upn = { siDEROID, oid_pkinit_name_type_upn_bytes, @@ -426,8 +432,9 @@ static SECItem pkinit_nt_upn = { static SECOidTag get_pkinit_data_auth_data_tag(void) { - static unsigned char oid_pkinit_auth_data_bytes[] = - { 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x01 }; + static unsigned char oid_pkinit_auth_data_bytes[] = { + 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x01 + }; static SECOidData oid_pkinit_auth_data = { { siDEROID, @@ -468,8 +475,9 @@ get_pkinit_data_auth_data9_tag(void) static SECOidTag get_pkinit_data_rkey_data_tag(void) { - static unsigned char oid_pkinit_rkey_data_bytes[] = - { 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x03 }; + static unsigned char oid_pkinit_rkey_data_bytes[] = { + 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x03 + }; static SECOidData oid_pkinit_rkey_data = { { siDEROID, @@ -489,8 +497,9 @@ get_pkinit_data_rkey_data_tag(void) static SECOidTag get_pkinit_data_dhkey_data_tag(void) { - static unsigned char oid_pkinit_dhkey_data_bytes[] = - { 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x02 }; + static unsigned char oid_pkinit_dhkey_data_bytes[] = { + 0x2b, 0x06, 0x01, 0x05, 0x02, 0x03, 0x02 + }; static SECOidData oid_pkinit_dhkey_data = { { siDEROID, @@ -692,7 +701,7 @@ crypto_get_p12_slot(struct _pkinit_identity_crypto_context *id) } #endif spec_size = strlen("configDir='' flags=readOnly") + - strlen(configdir) + 1; + strlen(configdir) + 1; spec = PORT_ArenaZAlloc(id->pool, spec_size); if (spec != NULL) { if (strcmp(configdir, DEFAULT_CONFIGDIR) != 0) @@ -1056,168 +1065,168 @@ static struct oakley_group * ((p-1)/2) */ } oakley_groups[] = { { - 1, 768, - "Oakley MODP Group 1", - "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" - "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" - "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" - "E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF", - 2, - "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" - "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" - "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" - "F242DABB 312F3F63 7A262174 D31D1B10 7FFFFFFF FFFFFFFF", + 1, 768, + "Oakley MODP Group 1", + "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" + "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" + "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" + "E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF", + 2, + "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" + "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" + "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" + "F242DABB 312F3F63 7A262174 D31D1B10 7FFFFFFF FFFFFFFF", }, { - 2, 1024, - "Oakley MODP Group 2", - "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" - "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" - "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" - "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" - "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381" - "FFFFFFFF FFFFFFFF", - 2, - "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" - "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" - "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" - "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" - "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F67329C0" - "FFFFFFFF FFFFFFFF", + 2, 1024, + "Oakley MODP Group 2", + "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" + "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" + "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" + "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" + "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381" + "FFFFFFFF FFFFFFFF", + 2, + "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" + "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" + "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" + "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" + "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F67329C0" + "FFFFFFFF FFFFFFFF", }, { - 5, 1536, - "Oakley MODP Group 5", - "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" - "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" - "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" - "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" - "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" - "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" - "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" - "670C354E 4ABC9804 F1746C08 CA237327 FFFFFFFF FFFFFFFF", - 2, - "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" - "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" - "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" - "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" - "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" - "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" - "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" - "B3861AA7 255E4C02 78BA3604 6511B993 FFFFFFFF FFFFFFFF", + 5, 1536, + "Oakley MODP Group 5", + "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" + "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" + "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" + "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" + "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" + "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" + "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" + "670C354E 4ABC9804 F1746C08 CA237327 FFFFFFFF FFFFFFFF", + 2, + "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" + "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" + "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" + "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" + "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" + "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" + "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" + "B3861AA7 255E4C02 78BA3604 6511B993 FFFFFFFF FFFFFFFF", }, { - 14, 2048, - "Oakley MODP Group 14", - "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" - "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" - "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" - "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" - "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" - "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" - "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" - "670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B" - "E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9" - "DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510" - "15728E5A 8AACAA68 FFFFFFFF FFFFFFFF", - 2, - "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" - "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" - "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" - "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" - "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" - "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" - "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" - "B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D" - "F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964" - "EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288" - "0AB9472D 45565534 7FFFFFFF FFFFFFFF", + 14, 2048, + "Oakley MODP Group 14", + "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" + "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" + "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" + "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" + "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" + "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" + "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" + "670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B" + "E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9" + "DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510" + "15728E5A 8AACAA68 FFFFFFFF FFFFFFFF", + 2, + "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" + "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" + "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" + "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" + "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" + "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" + "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" + "B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D" + "F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964" + "EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288" + "0AB9472D 45565534 7FFFFFFF FFFFFFFF", }, { - 15, 3072, - "Oakley MODP Group 15", - "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" - "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" - "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" - "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" - "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" - "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" - "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" - "670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B" - "E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9" - "DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510" - "15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64" - "ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7" - "ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B" - "F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C" - "BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31" - "43DB5BFC E0FD108E 4B82D120 A93AD2CA FFFFFFFF FFFFFFFF", - 2, - "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" - "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" - "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" - "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" - "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" - "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" - "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" - "B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D" - "F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964" - "EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288" - "0AB9472D 45556216 D6998B86 82283D19 D42A90D5 EF8E5D32" - "767DC282 2C6DF785 457538AB AE83063E D9CB87C2 D370F263" - "D5FAD746 6D8499EB 8F464A70 2512B0CE E771E913 0D697735" - "F897FD03 6CC50432 6C3B0139 9F643532 290F958C 0BBD9006" - "5DF08BAB BD30AEB6 3B84C460 5D6CA371 047127D0 3A72D598" - "A1EDADFE 707E8847 25C16890 549D6965 7FFFFFFF FFFFFFFF", + 15, 3072, + "Oakley MODP Group 15", + "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" + "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" + "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" + "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" + "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" + "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" + "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" + "670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B" + "E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9" + "DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510" + "15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64" + "ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7" + "ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B" + "F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C" + "BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31" + "43DB5BFC E0FD108E 4B82D120 A93AD2CA FFFFFFFF FFFFFFFF", + 2, + "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" + "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" + "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" + "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" + "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" + "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" + "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" + "B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D" + "F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964" + "EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288" + "0AB9472D 45556216 D6998B86 82283D19 D42A90D5 EF8E5D32" + "767DC282 2C6DF785 457538AB AE83063E D9CB87C2 D370F263" + "D5FAD746 6D8499EB 8F464A70 2512B0CE E771E913 0D697735" + "F897FD03 6CC50432 6C3B0139 9F643532 290F958C 0BBD9006" + "5DF08BAB BD30AEB6 3B84C460 5D6CA371 047127D0 3A72D598" + "A1EDADFE 707E8847 25C16890 549D6965 7FFFFFFF FFFFFFFF", }, { - 16, 4096, - "Oakley MODP Group 16", - "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" - "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" - "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" - "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" - "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" - "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" - "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" - "670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B" - "E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9" - "DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510" - "15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64" - "ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7" - "ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B" - "F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C" - "BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31" - "43DB5BFC E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7" - "88719A10 BDBA5B26 99C32718 6AF4E23C 1A946834 B6150BDA" - "2583E9CA 2AD44CE8 DBBBC2DB 04DE8EF9 2E8EFC14 1FBECAA6" - "287C5947 4E6BC05D 99B2964F A090C3A2 233BA186 515BE7ED" - "1F612970 CEE2D7AF B81BDD76 2170481C D0069127 D5B05AA9" - "93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34063199" - "FFFFFFFF FFFFFFFF", - 2, - "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" - "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" - "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" - "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" - "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" - "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" - "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" - "B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D" - "F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964" - "EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288" - "0AB9472D 45556216 D6998B86 82283D19 D42A90D5 EF8E5D32" - "767DC282 2C6DF785 457538AB AE83063E D9CB87C2 D370F263" - "D5FAD746 6D8499EB 8F464A70 2512B0CE E771E913 0D697735" - "F897FD03 6CC50432 6C3B0139 9F643532 290F958C 0BBD9006" - "5DF08BAB BD30AEB6 3B84C460 5D6CA371 047127D0 3A72D598" - "A1EDADFE 707E8847 25C16890 54908400 8D391E09 53C3F36B" - "C438CD08 5EDD2D93 4CE1938C 357A711E 0D4A341A 5B0A85ED" - "12C1F4E5 156A2674 6DDDE16D 826F477C 97477E0A 0FDF6553" - "143E2CA3 A735E02E CCD94B27 D04861D1 119DD0C3 28ADF3F6" - "8FB094B8 67716BD7 DC0DEEBB 10B8240E 68034893 EAD82D54" - "C9DA754C 46C7EEE0 C37FDBEE 48536047 A6FA1AE4 9A0318CC" - "FFFFFFFF FFFFFFFF", + 16, 4096, + "Oakley MODP Group 16", + "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" + "29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" + "EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" + "E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED" + "EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D" + "C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F" + "83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D" + "670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B" + "E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9" + "DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510" + "15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64" + "ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7" + "ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B" + "F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C" + "BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31" + "43DB5BFC E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7" + "88719A10 BDBA5B26 99C32718 6AF4E23C 1A946834 B6150BDA" + "2583E9CA 2AD44CE8 DBBBC2DB 04DE8EF9 2E8EFC14 1FBECAA6" + "287C5947 4E6BC05D 99B2964F A090C3A2 233BA186 515BE7ED" + "1F612970 CEE2D7AF B81BDD76 2170481C D0069127 D5B05AA9" + "93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34063199" + "FFFFFFFF FFFFFFFF", + 2, + "7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68" + "94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E" + "F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122" + "F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6" + "F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E" + "E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF" + "C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36" + "B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D" + "F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964" + "EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288" + "0AB9472D 45556216 D6998B86 82283D19 D42A90D5 EF8E5D32" + "767DC282 2C6DF785 457538AB AE83063E D9CB87C2 D370F263" + "D5FAD746 6D8499EB 8F464A70 2512B0CE E771E913 0D697735" + "F897FD03 6CC50432 6C3B0139 9F643532 290F958C 0BBD9006" + "5DF08BAB BD30AEB6 3B84C460 5D6CA371 047127D0 3A72D598" + "A1EDADFE 707E8847 25C16890 54908400 8D391E09 53C3F36B" + "C438CD08 5EDD2D93 4CE1938C 357A711E 0D4A341A 5B0A85ED" + "12C1F4E5 156A2674 6DDDE16D 826F477C 97477E0A 0FDF6553" + "143E2CA3 A735E02E CCD94B27 D04861D1 119DD0C3 28ADF3F6" + "8FB094B8 67716BD7 DC0DEEBB 10B8240E 68034893 EAD82D54" + "C9DA754C 46C7EEE0 C37FDBEE 48536047 A6FA1AE4 9A0318CC" + "FFFFFFFF FFFFFFFF", } }; @@ -1806,8 +1815,8 @@ create_krb5_trustedCertifiers(krb5_context context, if (!CERT_LIST_EMPTY(id_cryptoctx->ca_certs)) { for (n = 0, node = CERT_LIST_HEAD(id_cryptoctx->ca_certs); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, id_cryptoctx->ca_certs); + (node->cert != NULL) && + !CERT_LIST_END(node, id_cryptoctx->ca_certs); node = CERT_LIST_NEXT(node)) { n++; } @@ -1861,8 +1870,8 @@ cert_maybe_add_to_list(CERTCertList *list, CERTCertificate *cert) for (node = CERT_LIST_HEAD(list); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, list); + (node->cert != NULL) && + !CERT_LIST_END(node, list); node = CERT_LIST_NEXT(node)) { if (SECITEM_ItemsAreEqual(&node->cert->derCert, &cert->derCert)) { /* Don't add the duplicate. */ @@ -1915,8 +1924,8 @@ cert_load_ca_certs_from_slot(krb5_context context, status = SECSuccess; for (node = CERT_LIST_HEAD(list); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, list); + (node->cert != NULL) && + !CERT_LIST_END(node, list); node = CERT_LIST_NEXT(node)) { #if 0 /* Skip it if it's not a root. */ @@ -1988,8 +1997,8 @@ cert_load_certs_with_keys_from_slot(krb5_context context, status = 0; for (cnode = CERT_LIST_HEAD(clist); (cnode != NULL) && - (cnode->cert != NULL) && - !CERT_LIST_END(cnode, clist); + (cnode->cert != NULL) && + !CERT_LIST_END(cnode, clist); cnode = CERT_LIST_NEXT(cnode)) { if (cnode->cert->nickname != NULL) { if ((label != NULL) && (id != NULL)) { @@ -2220,12 +2229,12 @@ crypto_nickname_c_cb(SECItem *old_nickname, PRBool *cancel, void *arg) i = (p ? atoi(p + 1) : 0) + 1; old_name = leaf->subjectName; new_name_size = strlen(PKCS12_PREFIX ": #") + - strlen(old_name) + 3 * sizeof(i) + 1; + strlen(old_name) + 3 * sizeof(i) + 1; new_name = PR_Malloc(new_name_size); } else { old_name = leaf->subjectName; new_name_size = strlen(PKCS12_PREFIX ": #1") + - strlen(old_name) + 1; + strlen(old_name) + 1; new_name = PR_Malloc(new_name_size); i = 1; } @@ -2516,16 +2525,16 @@ crypto_load_files(krb5_context context, if (after != NULL) { for (anode = CERT_LIST_HEAD(after); (anode != NULL) && - (anode->cert != NULL) && - !CERT_LIST_END(anode, after); + (anode->cert != NULL) && + !CERT_LIST_END(anode, after); anode = CERT_LIST_NEXT(anode)) { match = PR_FALSE; a = anode->cert->derCert; if (before != NULL) { for (bnode = CERT_LIST_HEAD(before); (bnode != NULL) && - (bnode->cert != NULL) && - !CERT_LIST_END(bnode, before); + (bnode->cert != NULL) && + !CERT_LIST_END(bnode, before); bnode = CERT_LIST_NEXT(bnode)) { b = bnode->cert->derCert; if (SECITEM_ItemsAreEqual(&a, &b)) { @@ -2692,7 +2701,7 @@ crypto_load_nssdb(krb5_context context, /* Build the spec. */ spec_size = strlen("configDir='' flags=readOnly") + - strlen(configdir) * 2 + 1; + strlen(configdir) * 2 + 1; p = PORT_ArenaZAlloc(id_cryptoctx->pool, spec_size); if (p == NULL) return ENOMEM; @@ -2848,8 +2857,8 @@ crypto_cert_get_count(krb5_context context, if (!CERT_LIST_EMPTY(id_cryptoctx->id_certs)) for (node = CERT_LIST_HEAD(id_cryptoctx->id_certs); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, id_cryptoctx->id_certs); + (node->cert != NULL) && + !CERT_LIST_END(node, id_cryptoctx->id_certs); node = CERT_LIST_NEXT(node)) (*cert_count)++; pkiDebug("%s: %d candidate key/certificate pairs found\n", @@ -3103,8 +3112,8 @@ crypto_cert_select_default(krb5_context context, cert = NULL; for (node = CERT_LIST_HEAD(id_cryptoctx->id_certs); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, id_cryptoctx->id_certs); + (node->cert != NULL) && + !CERT_LIST_END(node, id_cryptoctx->id_certs); node = CERT_LIST_NEXT(node)) { sans = NULL; pkiDebug("%s: checking candidate certificate \"%s\"\n", @@ -3514,8 +3523,8 @@ pkinit_create_td_trusted_certifiers(krb5_context context, * root, add it to the list. */ for (node = CERT_LIST_HEAD(sclist); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, sclist); + (node->cert != NULL) && + !CERT_LIST_END(node, sclist); node = CERT_LIST_NEXT(node)) { /* If we have no trust for it, we can't trust it. */ if (cert->trust == NULL) @@ -3552,8 +3561,8 @@ pkinit_create_td_trusted_certifiers(krb5_context context, i = 0; for (node = CERT_LIST_HEAD(clist); (node != NULL) && - (node->cert != NULL) && - !CERT_LIST_END(node, clist); + (node->cert != NULL) && + !CERT_LIST_END(node, clist); node = CERT_LIST_NEXT(node)) { if (node->cert->keyIDGenerated) { isn.issuer = node->cert->derIssuer; @@ -4128,19 +4137,19 @@ cert_retrieve_cert_sans(krb5_context context, n_upn_sans = n_pkinit_sans; } else /* possibly a user principal name */ - if (SECITEM_ItemsAreEqual(&name.name.OthName.oid, - &pkinit_nt_upn)) { - /* Add it to the list. */ - if ((upn_sans_out != NULL) && - (cert_add_upn(pool, context, &name.name.OthName.name, - upn_sans_out, &n_upn_sans) != 0)) { - PORT_FreeArena(pool, PR_TRUE); - return ENOMEM; + if (SECITEM_ItemsAreEqual(&name.name.OthName.oid, + &pkinit_nt_upn)) { + /* Add it to the list. */ + if ((upn_sans_out != NULL) && + (cert_add_upn(pool, context, &name.name.OthName.name, + upn_sans_out, &n_upn_sans) != 0)) { + PORT_FreeArena(pool, PR_TRUE); + return ENOMEM; + } + /* If both lists are the same, fix the count. */ + if (upn_sans_out == pkinit_sans_out) + n_pkinit_sans = n_upn_sans; } - /* If both lists are the same, fix the count. */ - if (upn_sans_out == pkinit_sans_out) - n_pkinit_sans = n_upn_sans; - } break; default: break; @@ -4795,8 +4804,8 @@ crypto_signeddata_common_verify(krb5_context context, return ENOMEM; } ocsp_failure_mode = require_crl_checking ? - ocspMode_FailureIsVerificationFailure : - ocspMode_FailureIsNotAVerificationFailure; + ocspMode_FailureIsVerificationFailure : + ocspMode_FailureIsNotAVerificationFailure; status = CERT_SetOCSPFailureMode(ocsp_failure_mode); if (status != SECSuccess) { pkiDebug("%s: error setting OCSP failure mode: %s\n", diff --git a/src/plugins/preauth/pkinit/pkinit_kdf_constants.c b/src/plugins/preauth/pkinit/pkinit_kdf_constants.c index c29d5e2b2..723400433 100644 --- a/src/plugins/preauth/pkinit/pkinit_kdf_constants.c +++ b/src/plugins/preauth/pkinit/pkinit_kdf_constants.c @@ -56,8 +56,8 @@ const krb5_octet krb5_pkinit_sha512_oid [8] = {0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x03}; const size_t krb5_pkinit_sha512_oid_len = 8; -#define oid_as_data(var, oid_base) \ - const krb5_octet_data var = \ +#define oid_as_data(var, oid_base) \ + const krb5_octet_data var = \ {0, sizeof oid_base, (krb5_octet *) oid_base} oid_as_data(sha1_id, krb5_pkinit_sha1_oid); oid_as_data(sha256_id, krb5_pkinit_sha256_oid); diff --git a/src/plugins/preauth/pkinit/pkinit_srv.c b/src/plugins/preauth/pkinit/pkinit_srv.c index e43fb7e81..44e310cf9 100644 --- a/src/plugins/preauth/pkinit/pkinit_srv.c +++ b/src/plugins/preauth/pkinit/pkinit_srv.c @@ -1066,7 +1066,7 @@ pkinit_server_return_padata(krb5_context context, goto cleanup; } - /* Otherwise, use the older octetstring2key() function */ + /* Otherwise, use the older octetstring2key() function */ } else { retval = pkinit_octetstring2key(context, enctype, server_key, server_key_len, encrypting_key); diff --git a/src/tests/gssapi/t_accname.c b/src/tests/gssapi/t_accname.c index 9912ecfe1..0326cedc7 100644 --- a/src/tests/gssapi/t_accname.c +++ b/src/tests/gssapi/t_accname.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2011 by the Massachusetts Institute of Technology. * All Rights Reserved. @@ -59,14 +59,14 @@ display_status_1(const char *m, OM_uint32 code, int type) if (!msg_ctx) break; - } + } } static void display_status(const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - display_status_1(msg, maj_stat, GSS_C_GSS_CODE); - display_status_1(msg, min_stat, GSS_C_MECH_CODE); + display_status_1(msg, maj_stat, GSS_C_GSS_CODE); + display_status_1(msg, min_stat, GSS_C_MECH_CODE); } int diff --git a/src/tests/gssapi/t_ccselect.c b/src/tests/gssapi/t_ccselect.c index 3a5bae5d8..620ce1c4b 100644 --- a/src/tests/gssapi/t_ccselect.c +++ b/src/tests/gssapi/t_ccselect.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* tests/gssapi/t_ccselect.c - Test program for GSSAPI cred selection */ /* * Copyright 2011 by the Massachusetts Institute of Technology. @@ -60,15 +60,15 @@ display_status_1(const char *m, OM_uint32 code, int type) if (!msg_ctx) break; - } + } } static void gsserr(const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - display_status_1(msg, maj_stat, GSS_C_GSS_CODE); - display_status_1(msg, min_stat, GSS_C_MECH_CODE); - exit(1); + display_status_1(msg, maj_stat, GSS_C_GSS_CODE); + display_status_1(msg, min_stat, GSS_C_MECH_CODE); + exit(1); } int diff --git a/src/tests/gssapi/t_gssexts.c b/src/tests/gssapi/t_gssexts.c index d4cb292cb..059f63340 100644 --- a/src/tests/gssapi/t_gssexts.c +++ b/src/tests/gssapi/t_gssexts.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. @@ -63,28 +63,28 @@ static int use_spnego = 0; static void displayStatus_1(char *m, OM_uint32 code, int type) { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc msg; - OM_uint32 msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - fprintf(stderr, "%s: %s\n", m, (char *)msg.value); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } + OM_uint32 maj_stat, min_stat; + gss_buffer_desc msg; + OM_uint32 msg_ctx; + + msg_ctx = 0; + while (1) { + maj_stat = gss_display_status(&min_stat, code, + type, GSS_C_NULL_OID, + &msg_ctx, &msg); + fprintf(stderr, "%s: %s\n", m, (char *)msg.value); + (void) gss_release_buffer(&min_stat, &msg); + + if (!msg_ctx) + break; + } } static void displayStatus(char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); - displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); + displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); + displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); } static OM_uint32 @@ -159,7 +159,7 @@ testPrf(OM_uint32 *minor, gss_ctx_id_t initiatorContext, } printf("%s\n", flags == GSS_C_PRF_KEY_FULL ? - "PRF_KEY_FULL" : "PRF_KEY_PARTIAL"); + "PRF_KEY_FULL" : "PRF_KEY_PARTIAL"); printf("Initiator PRF: "); for (i = 0; i < initiatorPrf.length; i++) { @@ -334,7 +334,7 @@ getDefaultCred(OM_uint32 *minor, const char *keytab_name, gss_OID_set mechs, krb5_cc_close(context, ccache); krb5_kt_close(context, keytab); krb5_free_context(context); - } else { + } else { gss_OID_set actual_mechs = GSS_C_NO_OID_SET; major = gss_acquire_cred(minor, @@ -369,7 +369,7 @@ main(int argc, char *argv[]) if (argc < 2 || argc > 5) { fprintf(stderr, "Usage: %s [--spnego] [user] " - "[proxy-target] [keytab]\n", argv[0]); + "[proxy-target] [keytab]\n", argv[0]); fprintf(stderr, " proxy-target and keytab are optional\n"); exit(1); } @@ -409,7 +409,7 @@ main(int argc, char *argv[]) } mechs.elements = use_spnego ? (gss_OID)&spnego_mech : - (gss_OID)gss_mech_krb5; + (gss_OID)gss_mech_krb5; mechs.count = 1; major = getDefaultCred(&minor, diff --git a/src/tests/gssapi/t_imp_cred.c b/src/tests/gssapi/t_imp_cred.c index f15a274f9..2818b22fd 100644 --- a/src/tests/gssapi/t_imp_cred.c +++ b/src/tests/gssapi/t_imp_cred.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* tests/gssapi/t_imp_cred.c - krb5_gss_import_cred test harness */ /* * Copyright 2011 by the Massachusetts Institute of Technology. @@ -58,15 +58,15 @@ display_status(const char *m, OM_uint32 code, int type) if (!msg_ctx) break; - } + } } static void exit_gsserr(const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - display_status(msg, maj_stat, GSS_C_GSS_CODE); - display_status(msg, min_stat, GSS_C_MECH_CODE); - exit(1); + display_status(msg, maj_stat, GSS_C_GSS_CODE); + display_status(msg, min_stat, GSS_C_MECH_CODE); + exit(1); } static void diff --git a/src/tests/gssapi/t_saslname.c b/src/tests/gssapi/t_saslname.c index 4794c8f96..8d1b28c20 100644 --- a/src/tests/gssapi/t_saslname.c +++ b/src/tests/gssapi/t_saslname.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. @@ -33,28 +33,28 @@ static void displayStatus_1(char *m, OM_uint32 code, int type) { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc msg; - OM_uint32 msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - fprintf(stderr, "%s: %s\n", m, (char *)msg.value); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } + OM_uint32 maj_stat, min_stat; + gss_buffer_desc msg; + OM_uint32 msg_ctx; + + msg_ctx = 0; + while (1) { + maj_stat = gss_display_status(&min_stat, code, + type, GSS_C_NULL_OID, + &msg_ctx, &msg); + fprintf(stderr, "%s: %s\n", m, (char *)msg.value); + (void) gss_release_buffer(&min_stat, &msg); + + if (!msg_ctx) + break; + } } static void displayStatus(char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); - displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); + displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); + displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); } static @@ -166,9 +166,9 @@ int main(int argc, char *argv[]) &oid))) { displayStatus("gss_inquire_mech_for_saslname", major, minor); } else if (oid == GSS_C_NO_OID || - (oid->length != mechs->elements[i].length && - memcmp(oid->elements, mechs->elements[i].elements, - oid->length) != 0)) { + (oid->length != mechs->elements[i].length && + memcmp(oid->elements, mechs->elements[i].elements, + oid->length) != 0)) { gss_release_buffer(&minor, &oidstr); (void) gss_oid_to_str(&minor, oid, &oidstr); fprintf(stderr, "Got different OID %.*s for mechanism %.*s\n", diff --git a/src/tests/gssapi/t_spnego.c b/src/tests/gssapi/t_spnego.c index 54ab14739..adb5737ab 100644 --- a/src/tests/gssapi/t_spnego.c +++ b/src/tests/gssapi/t_spnego.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2010 by the Massachusetts Institute of Technology. * All Rights Reserved. @@ -42,34 +42,34 @@ static gss_OID_desc spnego_mech = { 6, "\053\006\001\005\005\002" }; static void displayStatus_1(m, code, type) - char *m; - OM_uint32 code; - int type; + char *m; + OM_uint32 code; + int type; { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc msg; - OM_uint32 msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - fprintf(stderr, "%s: %s\n", m, (char *)msg.value); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } + OM_uint32 maj_stat, min_stat; + gss_buffer_desc msg; + OM_uint32 msg_ctx; + + msg_ctx = 0; + while (1) { + maj_stat = gss_display_status(&min_stat, code, + type, GSS_C_NULL_OID, + &msg_ctx, &msg); + fprintf(stderr, "%s: %s\n", m, (char *)msg.value); + (void) gss_release_buffer(&min_stat, &msg); + + if (!msg_ctx) + break; + } } static void displayStatus(msg, maj_stat, min_stat) - char *msg; - OM_uint32 maj_stat; - OM_uint32 min_stat; + char *msg; + OM_uint32 maj_stat; + OM_uint32 min_stat; { - displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); - displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); + displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); + displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); } static OM_uint32 diff --git a/src/util/support/gettimeofday.c b/src/util/support/gettimeofday.c index e31f38b9c..8d8fcd84f 100644 --- a/src/util/support/gettimeofday.c +++ b/src/util/support/gettimeofday.c @@ -91,12 +91,12 @@ krb5int_gettimeofday (struct timeval *tp, void *ignore) int krb5int_gettimeofday (struct timeval *tp, void *ignore) { - time_t t; + time_t t; - t = time(NULL); - tp->tv_sec = (long) t; - tp->tv_usec = 0; - return 0; + t = time(NULL); + tp->tv_sec = (long) t; + tp->tv_usec = 0; + return 0; } #endif /* !_WIN32 */ -- 2.26.2