| /freebsd-12.1/sys/contrib/libsodium/test/default/ |
| H A D | chacha20.c | 29 size_t plen; in tv() local 40 for (plen = 1U; plen < sizeof out; plen++) { in tv() 43 if (memcmp(part, zero, plen) != 0) { in tv() 50 for (plen = 1U; plen < 66; plen += 3) { in tv() 51 memset(out, (int) (plen & 0xff), sizeof out); in tv() 52 crypto_stream_chacha20(out, plen, nonce, key); in tv() 116 size_t plen; in tv_ietf() local 128 for (plen = 1U; plen < sizeof out; plen++) { in tv_ietf() 131 if (memcmp(part, zero, plen) != 0) { in tv_ietf() 138 for (plen = 1U; plen < 66; plen += 3) { in tv_ietf() [all …]
|
| /freebsd-12.1/contrib/bearssl/src/rsa/ |
| H A D | rsa_i31_modulus.c | 34 size_t nlen, plen, qlen, tlen; in br_rsa_i31_compute_modulus() local 40 plen = sk->plen; in br_rsa_i31_compute_modulus() 41 while (plen > 0 && *pbuf == 0) { in br_rsa_i31_compute_modulus() 43 plen --; in br_rsa_i31_compute_modulus() 58 if ((31 * tlen) < (plen << 3) + 31) { in br_rsa_i31_compute_modulus() 61 br_i31_decode(t, pbuf, plen); in br_rsa_i31_compute_modulus() 63 plen = (p[0] + 63) >> 5; in br_rsa_i31_compute_modulus() 64 t += plen; in br_rsa_i31_compute_modulus() 65 tlen -= plen; in br_rsa_i31_compute_modulus() 83 if (tlen < (plen + qlen + 1)) { in br_rsa_i31_compute_modulus()
|
| H A D | rsa_i15_modulus.c | 34 size_t nlen, plen, qlen, tlen; in br_rsa_i15_compute_modulus() local 40 plen = sk->plen; in br_rsa_i15_compute_modulus() 41 while (plen > 0 && *pbuf == 0) { in br_rsa_i15_compute_modulus() 43 plen --; in br_rsa_i15_compute_modulus() 58 if ((15 * tlen) < (plen << 3) + 15) { in br_rsa_i15_compute_modulus() 61 br_i15_decode(t, pbuf, plen); in br_rsa_i15_compute_modulus() 63 plen = (p[0] + 31) >> 4; in br_rsa_i15_compute_modulus() 64 t += plen; in br_rsa_i15_compute_modulus() 65 tlen -= plen; in br_rsa_i15_compute_modulus() 83 if (tlen < (plen + qlen + 1)) { in br_rsa_i15_compute_modulus()
|
| H A D | rsa_i31_pubexp.c | 32 get_pubexp(const unsigned char *pbuf, size_t plen, in get_pubexp() argument 55 while (plen > 0 && *pbuf == 0) { in get_pubexp() 57 plen --; in get_pubexp() 59 if (plen == 0 || plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8)) { in get_pubexp() 71 if (dplen > plen || dplen == 0 in get_pubexp() 72 || (dplen == plen && dpbuf[0] > pbuf[0])) in get_pubexp() 80 if ((pbuf[plen - 1] & 3) != 3 || (dpbuf[dplen - 1] & 1) != 1) { in get_pubexp() 88 br_i31_decode(p, pbuf, plen); in get_pubexp() 149 ep = get_pubexp(sk->p, sk->plen, sk->dp, sk->dplen); in br_rsa_i31_compute_pubexp()
|
| H A D | rsa_i15_pubexp.c | 32 get_pubexp(const unsigned char *pbuf, size_t plen, in get_pubexp() argument 55 while (plen > 0 && *pbuf == 0) { in get_pubexp() 57 plen --; in get_pubexp() 59 if (plen == 0 || plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8)) { in get_pubexp() 71 if (dplen > plen || dplen == 0 in get_pubexp() 72 || (dplen == plen && dpbuf[0] > pbuf[0])) in get_pubexp() 80 if ((pbuf[plen - 1] & 3) != 3 || (dpbuf[dplen - 1] & 1) != 1) { in get_pubexp() 88 br_i15_decode(p, pbuf, plen); in get_pubexp() 149 ep = get_pubexp(sk->p, sk->plen, sk->dp, sk->dplen); in br_rsa_i15_compute_pubexp()
|
| H A D | rsa_i31_privexp.c | 64 size_t plen, qlen, u, len, dlen; in br_rsa_i31_compute_privexp() local 79 plen = sk->plen; in br_rsa_i31_compute_privexp() 80 while (plen > 0 && *pbuf == 0) { in br_rsa_i31_compute_privexp() 82 plen --; in br_rsa_i31_compute_privexp() 84 if (plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8) in br_rsa_i31_compute_privexp() 85 || (pbuf[plen - 1] & 1) != 1) in br_rsa_i31_compute_privexp() 110 br_i31_decode(p, pbuf, plen); in br_rsa_i31_compute_privexp() 111 plen = (p[0] + 31) >> 5; in br_rsa_i31_compute_privexp() 112 q = p + 1 + plen; in br_rsa_i31_compute_privexp()
|
| H A D | rsa_i15_privexp.c | 64 size_t plen, qlen, u, len, dlen; in br_rsa_i15_compute_privexp() local 79 plen = sk->plen; in br_rsa_i15_compute_privexp() 80 while (plen > 0 && *pbuf == 0) { in br_rsa_i15_compute_privexp() 82 plen --; in br_rsa_i15_compute_privexp() 84 if (plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8) in br_rsa_i15_compute_privexp() 85 || (pbuf[plen - 1] & 1) != 1) in br_rsa_i15_compute_privexp() 110 br_i15_decode(p, pbuf, plen); in br_rsa_i15_compute_privexp() 111 plen = (p[0] + 15) >> 4; in br_rsa_i15_compute_privexp() 112 q = p + 1 + plen; in br_rsa_i15_compute_privexp()
|
| H A D | rsa_i31_priv.c | 35 size_t plen, qlen; in br_rsa_i31_private() local 50 plen = sk->plen; in br_rsa_i31_private() 51 while (plen > 0 && *p == 0) { in br_rsa_i31_private() 53 plen --; in br_rsa_i31_private() 65 z = (long)(plen > qlen ? plen : qlen) << 3; in br_rsa_i31_private() 99 br_i31_decode(t1, p, plen); in br_rsa_i31_private()
|
| /freebsd-12.1/crypto/openssl/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 239 if (plen) { in chacha20_poly1305_tls_cipher() 245 in += plen; in chacha20_poly1305_tls_cipher() 246 out += plen; in chacha20_poly1305_tls_cipher() 306 in += plen; in chacha20_poly1305_tls_cipher() 307 out += plen; in chacha20_poly1305_tls_cipher() 408 plen = len; in chacha20_poly1305_cipher() 415 in += plen; in chacha20_poly1305_cipher() 416 out += plen; in chacha20_poly1305_cipher() 421 in += plen; in chacha20_poly1305_cipher() 422 out += plen; in chacha20_poly1305_cipher() [all …]
|
| H A D | e_rc4_hmac_md5.c | 76 size_t plen = key->payload_length; in rc4_hmac_md5_cipher() local 78 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in rc4_hmac_md5_cipher() 82 if (plen == NO_PAYLOAD_LENGTH) in rc4_hmac_md5_cipher() 83 plen = len; in rc4_hmac_md5_cipher() 89 if (plen > md5_off && (blocks = (plen - md5_off) / MD5_CBLOCK) && in rc4_hmac_md5_cipher() 108 MD5_Update(&key->md, in + md5_off, plen - md5_off); in rc4_hmac_md5_cipher() 110 if (plen != len) { /* "TLS" mode of operation */ in rc4_hmac_md5_cipher() 115 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher() 117 MD5_Update(&key->md, out + plen, MD5_DIGEST_LENGTH); in rc4_hmac_md5_cipher() 118 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher() [all …]
|
| /freebsd-12.1/contrib/wpa/src/tls/ |
| H A D | tlsv1_record.c | 356 size_t plen; in tlsv1_record_receive() local 362 plen = in_len; in tlsv1_record_receive() 364 "data", out_data, plen); in tlsv1_record_receive() 388 plen -= rl->iv_size; in tlsv1_record_receive() 392 if (plen == 0) { in tlsv1_record_receive() 399 if (padlen >= plen) { in tlsv1_record_receive() 407 for (i = plen - padlen - 1; i < plen - 1; i++) { in tlsv1_record_receive() 419 plen -= padlen + 1; in tlsv1_record_receive() 434 plen -= rl->hash_size; in tlsv1_record_receive() 448 WPA_PUT_BE16(len, plen); in tlsv1_record_receive() [all …]
|
| /freebsd-12.1/contrib/tcpdump/ |
| H A D | print-bgp.c | 539 if (32 < plen) in decode_prefix4() 582 if (24 > plen) in decode_labeled_prefix4() 587 if (32 < plen) in decode_labeled_prefix4() 758 u_int plen; in decode_rt_routing_info() local 775 if (32 > plen) in decode_rt_routing_info() 784 if (64 < plen) in decode_rt_routing_info() 814 u_int plen; in decode_labeled_vpn_prefix4() local 1125 plen = pd[0]; in decode_prefix6() 1199 u_int plen; in decode_labeled_vpn_prefix6() local 1238 u_int plen; in decode_clnp_prefix() local [all …]
|
| H A D | print-babel.c | 180 if(plen >= 0) in network_prefix() 181 pb = (plen + 7) / 8; in network_prefix() 492 u_char plen; in babel_print_v2() local 530 u_char prefix[16], plen; in babel_print_v2() local 549 u_char prefix[16], plen; in babel_print_v2() local 600 plen = message[4]; in babel_print_v2() 610 plen += 96; in babel_print_v2() 640 plen = message[3]; in babel_print_v2() 646 plen += 96; in babel_print_v2() 675 plen = message[3]; in babel_print_v2() [all …]
|
| /freebsd-12.1/sys/netpfil/ipfw/nat64/ |
| H A D | nat64_translate.c | 325 switch (plen) { in nat64_embed_ip4() 379 switch (plen) { in nat64_extract_ip4() 403 switch (plen) { in nat64_extract_ip4() 514 int plen; in nat64_fragment6() local 557 len = plen; in nat64_fragment6() 563 plen -= len; in nat64_fragment6() 626 int len, plen; in nat64_icmp6_reflect() local 630 if (plen < 0) { in nat64_icmp6_reflect() 741 int len, plen; in nat64_icmp_reflect() local 1180 int plen, hlen; in nat64_do_handle_ip4() local [all …]
|
| /freebsd-12.1/sbin/ipfw/ |
| H A D | nptv6.c | 195 int tcmd, flags, plen; in nptv6_create() local 198 plen = 0; in nptv6_create() 213 if (plen > 0) in nptv6_create() 224 if (plen > 0) in nptv6_create() 242 plen = strtol(*av, &p, 10); in nptv6_create() 244 if (*p != '\0' || plen < 8 || plen > 64) in nptv6_create() 247 if (cfg->plen > 0 && cfg->plen != plen) { in nptv6_create() 250 cfg->plen, plen, MAX(plen, cfg->plen)); in nptv6_create() 251 plen = MAX(plen, cfg->plen); in nptv6_create() 253 cfg->plen = plen; in nptv6_create() [all …]
|
| /freebsd-12.1/sys/i386/i386/ |
| H A D | copyout.c | 108 int error, i, plen; in cp_slow0() local 117 if (i != plen) in cp_slow0() 178 size_t plen; in copyinstr() local 184 plen < maxlen && !ca.end; uc += ca.alen, plen += ca.alen) { in copyinstr() 199 *lencopied = plen; in copyinstr() 222 size_t plen; in copyin() local 231 plen < len; uc += ca.len, ca.kc += ca.len, plen += ca.len) { in copyin() 236 ca.len = len - plen; in copyin() 257 size_t plen; in copyout() local 266 plen < len; uc += ca.len, ca.kc += ca.len, plen += ca.len) { in copyout() [all …]
|
| /freebsd-12.1/crypto/openssh/ |
| H A D | sshbuf-misc.c | 95 size_t len = sshbuf_len(buf), plen; in sshbuf_dtob64() local 102 plen = ((len + 2) / 3) * 4 + 1; in sshbuf_dtob64() 105 if ((r = b64_ntop(p, len, ret, plen)) == -1) { in sshbuf_dtob64() 106 explicit_bzero(ret, plen); in sshbuf_dtob64() 116 size_t plen = strlen(b64); in sshbuf_b64tod() local 120 if (plen == 0) in sshbuf_b64tod() 122 if ((p = malloc(plen)) == NULL) in sshbuf_b64tod() 124 if ((nlen = b64_pton(b64, p, plen)) < 0) { in sshbuf_b64tod() 125 explicit_bzero(p, plen); in sshbuf_b64tod() 130 explicit_bzero(p, plen); in sshbuf_b64tod() [all …]
|
| /freebsd-12.1/lib/libc/db/btree/ |
| H A D | bt_overflow.c | 84 size_t nb, plen; in __ovfl_get() local 107 plen = t->bt_psize - BTDATAOFF; in __ovfl_get() 112 nb = MIN(sz, plen); in __ovfl_get() 139 size_t nb, plen; in __ovfl_put() local 146 plen = t->bt_psize - BTDATAOFF; in __ovfl_put() 148 p = (char *)p + plen, last = h) { in __ovfl_put() 157 nb = MIN(sz, plen); in __ovfl_put() 189 size_t plen; in __ovfl_delete() local 209 for (plen = t->bt_psize - BTDATAOFF;; sz -= plen) { in __ovfl_delete() 212 if (sz <= plen) in __ovfl_delete()
|
| /freebsd-12.1/crypto/openssl/crypto/asn1/ |
| H A D | bio_ndef.c | 45 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 46 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, 48 static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 49 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, 104 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument 128 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix() 133 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_prefix_free() argument 147 *plen = 0; in ndef_prefix_free() 151 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_suffix_free() argument 155 if (!ndef_prefix_free(b, pbuf, plen, parg)) in ndef_suffix_free() [all …]
|
| H A D | tasn_dec.c | 665 long plen; in asn1_d2i_ex_primitive() local 774 len = plen; in asn1_d2i_ex_primitive() 775 p += plen; in asn1_d2i_ex_primitive() 939 long plen; in asn1_find_end() local 1007 long plen; in asn1_collect() local 1048 } else if (plen && !collect_data(buf, &p, plen)) in asn1_collect() 1071 *p += plen; in collect_data() 1104 long plen; in asn1_check_tlen() local 1111 plen = ctx->plen; in asn1_check_tlen() 1119 ctx->plen = plen; in asn1_check_tlen() [all …]
|
| /freebsd-12.1/contrib/ofed/libcxgb4/ |
| H A D | qp.c | 107 u32 plen = 0; in build_immd() local 122 len = ROUND_UP(plen + 8, 16) - (plen + 8); in build_immd() 137 u32 plen = 0; in build_isgl() local 141 if ((plen + sg_list[i].length) < plen) in build_isgl() 161 u32 plen; in build_rdma_send() local 177 plen = 0; in build_rdma_send() 200 plen = 0; in build_rdma_send() 203 wqe->send.plen = htobe32(plen); in build_rdma_send() 210 u32 plen; in build_rdma_write() local 241 plen = 0; in build_rdma_write() [all …]
|
| /freebsd-12.1/contrib/smbfs/lib/smb/ |
| H A D | rap.c | 181 memset(p, value, plen); in smb_rap_rqparam() 182 len = plen; in smb_rap_rqparam() 197 int plen, len; in smb_rap_create() local 213 len += plen; in smb_rap_create() 238 int error, plen; in smb_rap_setNparam() local 240 error = smb_rap_parserqparam(p, &p, &plen); in smb_rap_setNparam() 264 int error, plen; in smb_rap_setPparam() local 266 error = smb_rap_parserqparam(p, &p, &plen); in smb_rap_setPparam() 285 int error, plen; in smb_rap_getNparam() local 287 error = smb_rap_parserpparam(p, &p, &plen); in smb_rap_getNparam() [all …]
|
| /freebsd-12.1/usr.sbin/ip6addrctl/ |
| H A D | ip6addrctl.c | 153 int plen, first = 1; in dump_policy() local 178 "/%d", plen); in dump_policy() 181 printf("%s/%d", addrbuf, plen); in dump_policy() 260 int e = 0, plen; in parse_prefix() local 284 plen = atoi(plenstr + 1); in parse_prefix() 285 if (plen < 0 || plen > 128) { in parse_prefix() 286 warnx("invalid prefix length: %d", plen); in parse_prefix() 290 plen2mask(&pol->addrmask, plen); in parse_prefix() 306 for(; plen >= 8; plen -= 8) in plen2mask() 308 if (plen > 0) in plen2mask() [all …]
|
| /freebsd-12.1/usr.bin/find/ |
| H A D | misc.c | 63 size_t newlen, plen; in brace_subst() local 65 plen = strlen(path); in brace_subst() 69 if (plen > 2 && newlen + plen - 2 < newlen) in brace_subst() 71 newlen += plen - 2; in brace_subst() 82 memcpy(dst, path, plen); in brace_subst() 83 dst += plen; in brace_subst()
|
| /freebsd-12.1/sys/kgssapi/krb5/ |
| H A D | kcrypto_aes.c | 184 size_t blocklen = 16, plen; in aes_encrypt() local 202 plen = len % blocklen; in aes_encrypt() 209 } else if (plen == 0) { in aes_encrypt() 240 off = skip + len - blocklen - plen; in aes_encrypt() 242 for (i = plen; i < blocklen; i++) in aes_encrypt() 247 m_copyback(inout, off + blocklen, plen, last2.cn_1); in aes_encrypt() 255 size_t blocklen = 16, plen; in aes_decrypt() local 272 plen = len % blocklen; in aes_decrypt() 278 } else if (plen == 0) { in aes_decrypt() 300 off = skip + len - plen - blocklen; in aes_decrypt() [all …]
|