Home
last modified time | relevance | path

Searched refs:cksum (Results 1 – 25 of 141) sorted by relevance

123456

/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/
H A Dutil_cksum.c40 krb5_checksum *cksum;
56 cksum->checksum_type = CKSUMTYPE_RSA_MD5;
57 cksum->length = sumlen;
62 if ((cksum->contents = (krb5_octet *) xmalloc(cksum->length)) == NULL) {
65 memset(cksum->contents, '\0', cksum->length);
105 &plaind, cksum);
109 if ((temp = xmalloc(cksum->length)) == NULL) {
110 krb5_free_checksum_contents(context, cksum);
115 memcpy(temp, cksum->contents, cksum->length);
116 krb5_free_checksum_contents(context, cksum);
[all …]
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/
H A Dmake_checksum.c65 cksum->length = cksumlen; in krb5_c_make_checksum()
67 if ((cksum->contents = (krb5_octet *) MALLOC(cksum->length)) == NULL) in krb5_c_make_checksum()
70 data.length = cksum->length; in krb5_c_make_checksum()
71 data.data = (char *) cksum->contents; in krb5_c_make_checksum()
144 cksum->magic = KV5M_CHECKSUM; in krb5_c_make_checksum()
145 cksum->checksum_type = cksumtype; in krb5_c_make_checksum()
158 (void) memcpy(trunc, cksum->contents, cksum->length); in krb5_c_make_checksum()
169 (void) memset(cksum->contents, 0, cksum->length); in krb5_c_make_checksum()
170 FREE(cksum->contents, cksum->length); in krb5_c_make_checksum()
171 cksum->length = 0; in krb5_c_make_checksum()
[all …]
H A Dverify_checksum.c39 const krb5_checksum *cksum, krb5_boolean *valid) in krb5_c_verify_checksum() argument
48 if (krb5_cksumtypes_list[i].ctype == cksum->checksum_type) in krb5_c_verify_checksum()
57 indata.length = cksum->length; in krb5_c_verify_checksum()
58 indata.data = (char *) cksum->contents; in krb5_c_verify_checksum()
68 if ((ret = krb5_c_checksum_length(context, cksum->checksum_type, &hashsize))) in krb5_c_verify_checksum()
71 if (cksum->length != hashsize) in krb5_c_verify_checksum()
76 if ((ret = krb5_c_make_checksum(context, cksum->checksum_type, key, usage, in krb5_c_verify_checksum()
82 *valid = (memcmp(computed.contents, cksum->contents, hashsize) == 0); in krb5_c_verify_checksum()
/illumos-gate/usr/src/cmd/boot/common/
H A Dmboot_extra.c48 uint32_t cksum = 0; in compute_checksum() local
53 cksum += *ck_ptr++; in compute_checksum()
55 return (-cksum); in compute_checksum()
64 uint32_t cksum; in find_multiboot() local
84 cksum = -(mboot->flags + mboot->magic); in find_multiboot()
85 if (mboot->checksum != cksum) { in find_multiboot()
88 mboot->checksum, cksum); in find_multiboot()
115 uint32_t cksum; in find_einfo() local
126 cksum = compute_checksum(extra + sizeof (bb_header_ext_t), in find_einfo()
128 BOOT_DEBUG("Extended information header checksum is %x\n", cksum); in find_einfo()
[all …]
/illumos-gate/usr/src/lib/libsqlite/test/
H A Dvacuum.test53 set ::cksum [cksum]
60 cksum
61 } $cksum
78 set ::cksum [cksum]
85 cksum
86 } $cksum
109 set ::cksum [cksum db2]
115 cksum
116 } $cksum
119 cksum db2
[all …]
H A Dioerr.test62 proc cksum {{db db}} {
70 set cksum [string length $txt]-[md5 $txt]
71 # puts $cksum-[file size test.db]
72 return $cksum
99 set ::cksum [cksum]
118 cksum
119 } $cksum
H A Dinterrupt.test25 proc cksum {{db db}} {
33 set cksum [string length $txt]-[md5 $txt]
34 # puts $cksum-[file size test.db]
35 return $cksum
44 set orig_sum [cksum]
57 cksum
100 set cksum [db eval {SELECT md5sum(a || b) FROM t1}]
106 } $cksum
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/mech/
H A Dutil_seqnum.c34 kg_make_seq_num(context, key, direction, seqnum, cksum, buf) in kg_make_seq_num() argument
39 unsigned char *cksum;
55 cksum, 8,
66 return(kg_encrypt(context, key, KG_USAGE_SEQ, cksum, plain, buf, 8));
69 krb5_error_code kg_get_seq_num(context, key, cksum, buf, direction, seqnum) in kg_get_seq_num() argument
72 unsigned char *cksum;
82 cksum, 8,
86 code = kg_decrypt(context, key, KG_USAGE_SEQ, cksum, buf, plain, 8);
H A Dk5seal.c76 krb5_checksum cksum; in make_seal_token_v1() local
256 cksum.length = cksum_size; in make_seal_token_v1()
257 cksum.contents = md5cksum.contents + 16 - cksum.length; in make_seal_token_v1()
259 (void) memcpy(ptr+14, cksum.contents, cksum.length); in make_seal_token_v1()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/crc32/
H A Dcrc.c165 krb5_const krb5_checksum *cksum,
207 crc32_verify_func(cksum, in, in_length, seed, seed_length) in crc32_verify_func() argument
208 krb5_const krb5_checksum *cksum; in crc32_verify_func()
221 if (cksum->checksum_type == CKSUMTYPE_CRC32) {
222 if (cksum->length == CRC32_CKSUM_LENGTH) {
230 if ((cksum->contents[0] != (krb5_octet) (c & 0xff)) ||
231 (cksum->contents[1] != (krb5_octet) ((c >> 8) & 0xff)) ||
232 (cksum->contents[2] != (krb5_octet) ((c >> 16) & 0xff)) ||
233 (cksum->contents[3] != (krb5_octet) ((c >> 24) & 0xff)))
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/
H A Dold_api_glue.c216 krb5_checksum cksum; in krb5_calculate_checksum() local
229 if (outcksum->length < cksum.length) { in krb5_calculate_checksum()
230 memset(cksum.contents, 0, cksum.length); in krb5_calculate_checksum()
231 free(cksum.contents); in krb5_calculate_checksum()
235 outcksum->magic = cksum.magic; in krb5_calculate_checksum()
236 outcksum->checksum_type = cksum.checksum_type; in krb5_calculate_checksum()
237 memcpy(outcksum->contents, cksum.contents, cksum.length); in krb5_calculate_checksum()
238 outcksum->length = cksum.length; in krb5_calculate_checksum()
240 free(cksum.contents); in krb5_calculate_checksum()
247 const krb5_checksum *cksum, krb5_const_pointer in, in krb5_verify_checksum() argument
[all …]
/illumos-gate/usr/src/uts/common/fs/zfs/
H A Dzio_checksum.c187 VERIFY((cksum & ~ZIO_CHECKSUM_MASK) == 0); in zio_checksum_to_feature()
189 switch (cksum) { in zio_checksum_to_feature()
301 cksum->zc_word[0] ^= cksum->zc_word[2]; in zio_checksum_handle_crypt()
302 cksum->zc_word[1] ^= cksum->zc_word[3]; in zio_checksum_handle_crypt()
305 cksum->zc_word[2] = saved->zc_word[2]; in zio_checksum_handle_crypt()
306 cksum->zc_word[3] = saved->zc_word[3]; in zio_checksum_handle_crypt()
320 zio_cksum_t cksum, saved; in zio_checksum_compute() local
368 &cksum); in zio_checksum_compute()
373 abd_copy_from_buf_off(abd, &cksum, in zio_checksum_compute()
379 &cksum); in zio_checksum_compute()
[all …]
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/old/
H A Dold_decrypt.c50 krb5_data output, cksum, crcivec; in krb5_old_decrypt() local
108 cksum.length = hashsize; in krb5_old_decrypt()
109 cksum.data = (char *)new_cksum; in krb5_old_decrypt()
111 if ((ret = ((*(hash->hash))(context, 1, &output, &cksum)))) in krb5_old_decrypt()
114 if (memcmp(cksum.data, orig_cksum, cksum.length) != 0) { in krb5_old_decrypt()
/illumos-gate/usr/src/uts/common/io/bge/
H A Dbge_send.c264 uint32_t cksum; in bge_pseudo_cksum() local
277 cksum = (((uint16_t)buf[2])<<8) + buf[3] - iphl; in bge_pseudo_cksum()
278 cksum += proto = buf[9]; in bge_pseudo_cksum()
279 cksum += (((uint16_t)buf[12])<<8) + buf[13]; in bge_pseudo_cksum()
280 cksum += (((uint16_t)buf[14])<<8) + buf[15]; in bge_pseudo_cksum()
281 cksum += (((uint16_t)buf[16])<<8) + buf[17]; in bge_pseudo_cksum()
282 cksum += (((uint16_t)buf[18])<<8) + buf[19]; in bge_pseudo_cksum()
283 cksum = (cksum>>16) + (cksum & 0xFFFF); in bge_pseudo_cksum()
284 cksum = (cksum>>16) + (cksum & 0xFFFF); in bge_pseudo_cksum()
298 *(uint16_t *)buf = htons((uint16_t)cksum); in bge_pseudo_cksum()
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/dk/
H A Ddk_decrypt.c86 unsigned char *plaindata = NULL, *cksum = NULL, *cn; in krb5_dk_decrypt_maybe_trunc_hmac() local
147 if ((cksum = (unsigned char *) MALLOC(hashsize)) == NULL) { in krb5_dk_decrypt_maybe_trunc_hmac()
152 d1.data = (char *) cksum; in krb5_dk_decrypt_maybe_trunc_hmac()
163 if (memcmp(cksum, input->data+enclen, hmacsize) != 0) { in krb5_dk_decrypt_maybe_trunc_hmac()
200 if (cksum) { in krb5_dk_decrypt_maybe_trunc_hmac()
201 (void) memset(cksum, 0, hashsize); in krb5_dk_decrypt_maybe_trunc_hmac()
202 FREE(cksum, hashsize); in krb5_dk_decrypt_maybe_trunc_hmac()
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/crc32/
H A Dcrc32.c42 mit_crc32(in, in_length, cksum) in mit_crc32() argument
45 unsigned long *cksum;
51 *cksum = crc;
/illumos-gate/usr/src/test/zfs-tests/tests/functional/rsend/
H A Dsend_encrypted_props.ksh80 typeset cksum=$(digest -a md5 /$TESTPOOL/ds/$TESTFILE0)
134 log_must test "$recv_cksum" == "$cksum"
150 log_must test "$recv_cksum" == "$cksum"
168 log_must test "$recv_cksum" == "$cksum"
182 log_must test "$recv_cksum" == "$cksum"
196 log_must test "$recv_cksum" == "$cksum"
210 log_must test "$recv_cksum" == "$cksum"
/illumos-gate/usr/src/uts/common/inet/ip/
H A Dip6_output.c725 uint32_t cksum; in ip_output_sw_cksum_v6() local
739 cksum = IP_TCP_CSUM_COMP; in ip_output_sw_cksum_v6()
765 cksum = htons(protocol); in ip_output_sw_cksum_v6()
787 cksum = IP_CSUM(mp, ip_hdr_length, cksum); in ip_output_sw_cksum_v6()
794 *cksump = ~cksum; in ip_output_sw_cksum_v6()
796 *cksump = cksum; in ip_output_sw_cksum_v6()
825 uint32_t cksum; in ip_output_cksum_v6() local
868 cksum = htons(protocol); in ip_output_cksum_v6()
925 cksum += *(cksump); in ip_output_cksum_v6()
926 cksum = (cksum & 0xFFFF) + (cksum >> 16); in ip_output_cksum_v6()
[all …]
H A Dip6_input.c1738 uint32_t cksum; in ip_input_cksum_pseudo_v6() local
1783 cksum = 0; in ip_input_cksum_pseudo_v6()
1787 return (cksum); in ip_input_cksum_pseudo_v6()
1800 uint32_t cksum; in ip_input_sw_cksum_v6() local
1810 cksum = IP_CSUM(mp, ip_hdr_length, cksum); in ip_input_sw_cksum_v6()
1811 if (cksum == 0) in ip_input_sw_cksum_v6()
1830 uint32_t cksum; in ip_input_cksum_v6() local
1960 cksum = ~(adj - cksum) & 0xFFFF; in ip_input_cksum_v6()
1962 cksum -= adj; in ip_input_cksum_v6()
1963 cksum = (cksum & 0xFFFF) + ((int)cksum >> 16); in ip_input_cksum_v6()
[all …]
/illumos-gate/usr/src/uts/common/io/mac/
H A Dmac_util.c175 uint32_t cksum; in mac_sw_cksum_ipv4() local
195 cksum = IP_TCP_CSUM_COMP; in mac_sw_cksum_ipv4()
236 cksum += htons(len); in mac_sw_cksum_ipv4()
244 cksum = IP_CSUM(mp, ulp_offset, cksum); in mac_sw_cksum_ipv4()
245 *up = (uint16_t)(cksum ? cksum : ~cksum); in mac_sw_cksum_ipv4()
267 uint32_t cksum; in mac_sw_cksum_ipv6() local
339 cksum += len; in mac_sw_cksum_ipv6()
348 cksum = IP_CSUM(mp, ulp_offset, cksum); in mac_sw_cksum_ipv6()
352 cksum = ~cksum; in mac_sw_cksum_ipv6()
354 *up = (uint16_t)cksum; in mac_sw_cksum_ipv6()
[all …]
/illumos-gate/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_scrub/
H A Dzpool_scrub_offline_device.ksh129 cksum=$(zpool status $TESTPOOL2 | awk '{if ($NF == "CKSUM") {fnd=1; next} \
131 if [[ $cksum != 0 ]]; then
132 log_fail "Unexpected CKSUM errors found on $TESTPOOL2 ($cksum)"
/illumos-gate/usr/src/uts/common/io/sfxge/common/
H A Defx_vpd.c504 uint8_t cksum; in efx_vpd_hunk_verify() local
535 cksum = 0; in efx_vpd_hunk_verify()
537 cksum += data[i]; in efx_vpd_hunk_verify()
539 if (cksum != 0) { in efx_vpd_hunk_verify()
601 uint8_t cksum; in efx_vpd_hunk_reinit() local
620 cksum = 0; in efx_vpd_hunk_reinit()
622 cksum += data[pos]; in efx_vpd_hunk_reinit()
799 uint8_t cksum; in efx_vpd_hunk_set() local
957 cksum = 0; in efx_vpd_hunk_set()
959 cksum += data[i]; in efx_vpd_hunk_set()
[all …]
/illumos-gate/usr/src/uts/common/os/
H A Ddevcache.c357 uint16_t cksum = 0; in nvp_cksum() local
363 cksum = buf[buflen]; in nvp_cksum()
367 cksum ^= *p++; in nvp_cksum()
368 return (cksum); in nvp_cksum()
382 uint16_t cksum, hdrsum; in fread_nvlist() local
416 cksum = hdr.nvpf_hdr_chksum; in fread_nvlist()
423 if (hdrsum != cksum) { in fread_nvlist()
426 filename, hdrsum, cksum); in fread_nvlist()
458 cksum = nvp_cksum((uchar_t *)buf, hdr.nvpf_size); in fread_nvlist()
459 if (hdr.nvpf_chksum != cksum) { in fread_nvlist()
[all …]
/illumos-gate/usr/src/lib/krb5/plugins/preauth/pkinit/
H A Dpkinit_clnt.c140 krb5_checksum cksum; local
144 cksum.contents = NULL;
170 der_req, &cksum);
277 const krb5_checksum * cksum, argument
307 free(cksum->contents);
867 encoded_request, &cksum);
875 cksum.length)) {
890 cksum.checksum_type, cksum.length);
891 print_buffer(cksum.contents, cksum.length);
918 if (cksum.contents != NULL)
[all …]
/illumos-gate/usr/src/uts/intel/io/viona/
H A Dviona_tx.c371 uint32_t cksum; in viona_tx_csum() local
389 cksum = IP_TCP_CSUM_COMP; in viona_tx_csum()
390 cksum += (dst >> 16) + (dst & 0xFFFF) + in viona_tx_csum()
392 cksum = (cksum & 0xFFFF) + (cksum >> 16); in viona_tx_csum()
393 *(cksump) = (cksum & 0xFFFF) + (cksum >> 16); in viona_tx_csum()

123456