| /freebsd/crypto/krb5/src/lib/gssapi/krb5/ |
| H A D | k5sealv3.c | 68 unsigned char *outbuf = NULL; in gss_krb5int_make_seal_token_v3() local 144 outbuf = gssalloc_malloc(bufsize); in gss_krb5int_make_seal_token_v3() 145 if (outbuf == NULL) { in gss_krb5int_make_seal_token_v3() 151 store_16_be(KG2_TOK_WRAP_MSG, outbuf); in gss_krb5int_make_seal_token_v3() 153 outbuf[2] = (acceptor_flag | FLAG_WRAP_CONFIDENTIAL | in gss_krb5int_make_seal_token_v3() 156 outbuf[3] = 0xff; in gss_krb5int_make_seal_token_v3() 158 store_16_be(ec, outbuf+4); in gss_krb5int_make_seal_token_v3() 160 store_16_be(0, outbuf+6); in gss_krb5int_make_seal_token_v3() 161 store_64_be(ctx->seq_send, outbuf+8); in gss_krb5int_make_seal_token_v3() 166 memcpy(plain.data + message->length + ec, outbuf, 16); in gss_krb5int_make_seal_token_v3() [all …]
|
| H A D | k5sealv3iov.c | 45 unsigned char *outbuf = NULL; in gss_krb5int_make_seal_token_v3_iov() local 131 outbuf = (unsigned char *)header->buffer.value; in gss_krb5int_make_seal_token_v3_iov() 145 store_16_be(KG2_TOK_WRAP_MSG, outbuf); in gss_krb5int_make_seal_token_v3_iov() 147 outbuf[2] = (acceptor_flag | FLAG_WRAP_CONFIDENTIAL | in gss_krb5int_make_seal_token_v3_iov() 150 outbuf[3] = 0xFF; in gss_krb5int_make_seal_token_v3_iov() 152 store_16_be(ec, outbuf + 4); in gss_krb5int_make_seal_token_v3_iov() 154 store_16_be(0, outbuf + 6); in gss_krb5int_make_seal_token_v3_iov() 155 store_64_be(ctx->seq_send, outbuf + 8); in gss_krb5int_make_seal_token_v3_iov() 173 store_16_be(rrc, outbuf + 6); in gss_krb5int_make_seal_token_v3_iov() 202 outbuf = (unsigned char *)header->buffer.value; in gss_krb5int_make_seal_token_v3_iov() [all …]
|
| /freebsd/crypto/krb5/src/lib/krb5/os/ |
| H A D | write_msg.c | 39 k5_write_messages(krb5_context context, krb5_pointer fdp, krb5_data *outbuf, in k5_write_messages() argument 53 len[0] = htonl(outbuf[0].length); in k5_write_messages() 55 SG_SET(&sg[1], outbuf[0].length ? outbuf[0].data : NULL, in k5_write_messages() 56 outbuf[0].length); in k5_write_messages() 58 len[1] = htonl(outbuf[1].length); in k5_write_messages() 60 SG_SET(&sg[3], outbuf[1].length ? outbuf[1].data : NULL, in k5_write_messages() 61 outbuf[1].length); in k5_write_messages() 66 outbuf += nbufs1; in k5_write_messages() 73 krb5_write_message(krb5_context context, krb5_pointer fdp, krb5_data *outbuf) in krb5_write_message() argument 75 return k5_write_messages(context, fdp, outbuf, 1); in krb5_write_message()
|
| /freebsd/crypto/openssl/test/ |
| H A D | rand_test.c | 29 unsigned char outbuf[3]; in test_rand() local 37 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 38 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy1, sizeof(outbuf)) in test_rand() 39 || !TEST_int_le(RAND_priv_bytes(outbuf, sizeof(outbuf) + 1), 0) in test_rand() 40 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 41 || !TEST_mem_eq(outbuf, sizeof(outbuf), in test_rand() 42 entropy1 + sizeof(outbuf), sizeof(outbuf))) in test_rand() 48 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 49 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy2, sizeof(outbuf))) in test_rand() 55 || !TEST_true(EVP_RAND_nonce(privctx, outbuf, sizeof(outbuf))) in test_rand() [all …]
|
| /freebsd/crypto/openssl/crypto/comp/ |
| H A D | c_zstd.c | 190 ZSTD_outBuffer outbuf; in zstd_stateful_compress_block() local 198 outbuf.dst = out; in zstd_stateful_compress_block() 199 outbuf.size = olen; in zstd_stateful_compress_block() 200 outbuf.pos = 0; in zstd_stateful_compress_block() 207 ret = ZSTD_endStream(state->compressor, &outbuf); in zstd_stateful_compress_block() 221 ret = ZSTD_compressStream2(state->compressor, &outbuf, &inbuf, ZSTD_e_continue); in zstd_stateful_compress_block() 231 ret = ZSTD_flushStream(state->compressor, &outbuf); in zstd_stateful_compress_block() 236 if (outbuf.pos > OSSL_SSIZE_MAX) in zstd_stateful_compress_block() 238 fret = (ossl_ssize_t)outbuf.pos; in zstd_stateful_compress_block() 249 ZSTD_outBuffer outbuf; in zstd_stateful_expand_block() local [all …]
|
| /freebsd/tools/test/iconv/posix/ |
| H A D | posix.c | 114 uint32_t outbuf[4]; in conv_ret() local 121 outptr = (char *)outbuf; in conv_ret() 136 uint32_t outbuf[2]; in conv_2big() local 143 outptr = (char *)outbuf; in conv_2big() 154 printf("outptr - outbuf = %d\n", (uint8_t *)outptr - (uint8_t *)outbuf); in conv_2big() 160 (outbytesleft == 0) && ((uint8_t *)outptr - (uint8_t *)outbuf == 8) && in conv_2big() 174 uint32_t outbuf[4]; in conv_einval() local 182 outptr = (char *)outbuf; in conv_einval() 193 printf("outptr - outbuf = %d\n", (uint8_t *)outptr - (uint8_t *)outbuf); in conv_einval() 199 (outbytesleft == 8) && ((uint8_t *)outptr - (uint8_t *)outbuf == 8) && in conv_einval() [all …]
|
| /freebsd/crypto/openssl/demos/cipher/ |
| H A D | aeskeywrap.c | 62 unsigned char outbuf[1024]; in aes_wrap_encrypt() local 86 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, wrap_pt, sizeof(wrap_pt))) in aes_wrap_encrypt() 90 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_encrypt() 96 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_encrypt() 98 if (sizeof(wrap_ct) == outlen && !CRYPTO_memcmp(outbuf, wrap_ct, outlen)) in aes_wrap_encrypt() 120 unsigned char outbuf[1024]; in aes_wrap_decrypt() local 143 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, wrap_ct, sizeof(wrap_ct))) in aes_wrap_decrypt() 147 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_decrypt() 153 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_decrypt() 155 if (sizeof(wrap_pt) == outlen && !CRYPTO_memcmp(outbuf, wrap_pt, outlen)) in aes_wrap_decrypt()
|
| H A D | ariacbc.c | 61 unsigned char outbuf[1024]; in aria_cbc_encrypt() local 83 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, cbc_pt, sizeof(cbc_pt))) in aria_cbc_encrypt() 87 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_encrypt() 93 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_encrypt() 95 if (sizeof(cbc_ct) == outlen && !CRYPTO_memcmp(outbuf, cbc_ct, outlen)) in aria_cbc_encrypt() 117 unsigned char outbuf[1024]; in aria_cbc_decrypt() local 138 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, cbc_ct, sizeof(cbc_ct))) in aria_cbc_decrypt() 142 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_decrypt() 148 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_decrypt() 150 if (sizeof(cbc_pt) == outlen && !CRYPTO_memcmp(outbuf, cbc_pt, outlen)) in aria_cbc_decrypt()
|
| H A D | aesgcm.c | 77 unsigned char outbuf[1024]; in aes_gcm_encrypt() local 114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt() 119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt() 122 if (!EVP_EncryptFinal_ex(ctx, outbuf, &tmplen)) in aes_gcm_encrypt() 154 unsigned char outbuf[1024]; in aes_gcm_decrypt() local 186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt() 191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt() 201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
|
| /freebsd/crypto/krb5/src/lib/krad/ |
| H A D | attr.c | 41 unsigned char outbuf[MAX_ATTRSIZE], size_t *outlen); 54 unsigned char outbuf[MAX_ATTRSIZE], size_t *outlen); 59 unsigned char outbuf[MAX_ATTRSIZE], size_t *outlen); 148 unsigned char outbuf[MAX_ATTRSIZE], size_t *outlen) in user_password_encode() 161 memset(outbuf, 0, len); in user_password_encode() 162 memcpy(outbuf, in->data, in->length); in user_password_encode() 178 zap(outbuf, len); in user_password_encode() 184 outbuf[blck * BLOCKSIZE + i] ^= sum.contents[i]; in user_password_encode() 187 indx = &outbuf[blck * BLOCKSIZE]; in user_password_encode() 200 unsigned char outbuf[MAX_ATTRSIZE], size_t *outlen) in user_password_decode() [all …]
|
| H A D | t_attr.c | 45 unsigned char outbuf[MAX_ATTRSETSIZE]; in main() local 67 &in, outbuf, &len)); in main() 69 insist(memcmp(outbuf, decoded, len) == 0); in main() 74 &in, outbuf, &len); in main() 77 insist(memcmp(outbuf, encoded, len) == 0); in main()
|
| /freebsd/usr.bin/rctl/ |
| H A D | rctl.c | 414 char *outbuf = NULL; in show_limits() local 419 outbuf = realloc(outbuf, outbuflen); in show_limits() 420 if (outbuf == NULL) in show_limits() 423 outbuf, outbuflen); in show_limits() 431 free(outbuf); in show_limits() 436 print_rules(outbuf, hflag, nflag); in show_limits() 437 free(outbuf); in show_limits() 497 char *copy, *outbuf = NULL, *tmp; in show_usage() local 502 outbuf = realloc(outbuf, outbuflen); in show_usage() 503 if (outbuf == NULL) in show_usage() [all …]
|
| /freebsd/crypto/krb5/src/lib/krb5/krb/ |
| H A D | sendauth.c | 50 krb5_data inbuf, outbuf[2]; in krb5_sendauth() local 63 outbuf[0].length = strlen(sendauth_version) + 1; in krb5_sendauth() 64 outbuf[0].data = (char *) sendauth_version; in krb5_sendauth() 65 outbuf[1].length = strlen(appl_version) + 1; in krb5_sendauth() 66 outbuf[1].data = appl_version; in krb5_sendauth() 67 if ((retval = k5_write_messages(context, fd, outbuf, 2))) in krb5_sendauth() 129 outbuf[0].data = NULL; /* Coverity is confused otherwise */ in krb5_sendauth() 132 &outbuf[0]))) in krb5_sendauth() 139 retval = krb5_write_message(context, fd, &outbuf[0]); in krb5_sendauth() 140 free(outbuf[0].data); in krb5_sendauth()
|
| H A D | recvauth.c | 58 krb5_data outbuf; in recvauth_common() local 175 if ((retval = krb5_mk_error(context, &error, &outbuf))) { in recvauth_common() 184 outbuf.length = 0; in recvauth_common() 185 outbuf.data = 0; in recvauth_common() 188 retval = krb5_write_message(context, fd, &outbuf); in recvauth_common() 189 if (outbuf.data) { in recvauth_common() 190 free(outbuf.data); in recvauth_common() 200 if ((retval = krb5_mk_rep(context, *auth_context, &outbuf))) { in recvauth_common() 203 retval = krb5_write_message(context, fd, &outbuf); in recvauth_common() 204 free(outbuf.data); in recvauth_common()
|
| /freebsd/contrib/ncurses/progs/ |
| H A D | dump_entry.c | 73 static DYNBUF outbuf; variable 157 free_DYN(&outbuf); in _nc_leaks_dump_entry() 417 while (outbuf.used > 0 && outbuf.text[outbuf.used - 1] == ' ') in trim_trailing() 418 outbuf.text[--outbuf.used] = '\0'; in trim_trailing() 426 strcpy_DYN(&outbuf, trailer); in force_wrap() 618 if (TcOutput() && outbuf.used && !wrap_1ST(mode)) { in wrap_concat() 625 strcpy_DYN(&outbuf, align); in wrap_concat() 632 strncpy_DYN(&outbuf, fill + step, (size_t) size); in wrap_concat() 644 strcpy_DYN(&outbuf, align); in wrap_concat() 645 strcpy_DYN(&outbuf, fill + step); in wrap_concat() [all …]
|
| /freebsd/tools/test/iconv/gnu/ |
| H A D | gnu.c | 247 char *outbuf; in ctl_uc_hook() local 253 outbuf = malloc(40); in ctl_uc_hook() 254 outptr = &outbuf; in ctl_uc_hook() 277 char *outbuf; in ctl_wc_hook() local 283 outbuf = malloc(40); in ctl_wc_hook() 284 outptr = &outbuf; in ctl_wc_hook() 350 uint8_t outbuf[4] = { 0x00, 0x00, 0x00, 0x00 }; in ctl_mb_to_uc_fb() local 368 outptr = (char *)outbuf; in ctl_mb_to_uc_fb() 376 printf("mb_uc fallback: %c\n", outbuf[0]); in ctl_mb_to_uc_fb() 379 if (mb_uc_fb && (outbuf[0] == 0x3F)) in ctl_mb_to_uc_fb() [all …]
|
| /freebsd/crypto/heimdal/lib/krb5/ |
| H A D | rd_safe.c | 87 krb5_data *outbuf, in krb5_rd_safe() argument 94 krb5_data_zero(outbuf); in krb5_rd_safe() 191 outbuf->length = safe.safe_body.user_data.length; in krb5_rd_safe() 192 outbuf->data = malloc(outbuf->length); in krb5_rd_safe() 193 if (outbuf->data == NULL && outbuf->length != 0) { in krb5_rd_safe() 196 krb5_data_zero(outbuf); in krb5_rd_safe() 199 memcpy (outbuf->data, safe.safe_body.user_data.data, outbuf->length); in krb5_rd_safe()
|
| /freebsd/sys/fs/cd9660/ |
| H A D | cd9660_rrip.c | 111 char *outbuf, *inbuf; in cd9660_rrip_slink() local 117 outbuf = ana->outbuf; in cd9660_rrip_slink() 130 *outbuf++ = '/'; in cd9660_rrip_slink() 157 outbuf -= len; in cd9660_rrip_slink() 189 ana->outbuf -= *ana->outlen; in cd9660_rrip_slink() 194 memcpy(outbuf, inbuf, wlen); in cd9660_rrip_slink() 195 outbuf += wlen; in cd9660_rrip_slink() 198 ana->outbuf = outbuf; in cd9660_rrip_slink() 260 ana->outbuf -= *ana->outlen - wlen; in cd9660_rrip_altname() 265 memcpy(ana->outbuf, inbuf, wlen); in cd9660_rrip_altname() [all …]
|
| /freebsd/contrib/wpa/src/eap_server/ |
| H A D | eap_server_pwd.c | 39 struct wpabuf *outbuf; member 135 data->inbuf = data->outbuf = NULL; in eap_pwd_init() 163 wpabuf_free(data->outbuf); in eap_pwd_reset() 178 data->outbuf = wpabuf_alloc(sizeof(struct eap_pwd_id) + in eap_pwd_build_id_req() 180 if (data->outbuf == NULL) { in eap_pwd_build_id_req() 186 wpabuf_free(data->outbuf); in eap_pwd_build_id_req() 187 data->outbuf = NULL; in eap_pwd_build_id_req() 226 wpabuf_put_be16(data->outbuf, data->group_num); in eap_pwd_build_id_req() 227 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_RAND_FUNC); in eap_pwd_build_id_req() 228 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_PRF); in eap_pwd_build_id_req() [all …]
|
| /freebsd/share/examples/ipfilter/samples/ |
| H A D | proxy.c | 232 char netbuf[1024], outbuf[1024]; local 248 orptr = outbuf; 249 owptr = outbuf; 250 osz = sizeof(outbuf); 258 if (orptr - outbuf < sizeof(outbuf)) 263 if (osz < sizeof(outbuf)) 278 i = read(net, orptr, sizeof(outbuf) - (orptr - outbuf)); 291 if (osz == sizeof(outbuf) || owptr == orptr) { 292 orptr = outbuf; 293 owptr = outbuf;
|
| /freebsd/contrib/wpa/src/eap_peer/ |
| H A D | eap_pwd.c | 41 struct wpabuf *outbuf; member 162 data->inbuf = data->outbuf = NULL; in eap_pwd_init() 197 wpabuf_free(data->outbuf); in eap_pwd_deinit() 335 data->outbuf = wpabuf_alloc(sizeof(struct eap_pwd_id) + in eap_pwd_perform_id_exchange() 337 if (data->outbuf == NULL) { in eap_pwd_perform_id_exchange() 341 wpabuf_put_be16(data->outbuf, data->group_num); in eap_pwd_perform_id_exchange() 342 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_RAND_FUNC); in eap_pwd_perform_id_exchange() 343 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_PRF); in eap_pwd_perform_id_exchange() 344 wpabuf_put_data(data->outbuf, id->token, sizeof(id->token)); in eap_pwd_perform_id_exchange() 345 wpabuf_put_u8(data->outbuf, id->prep); in eap_pwd_perform_id_exchange() [all …]
|
| /freebsd/usr.bin/gzip/ |
| H A D | unbzip2.c | 42 static char *inbuf, *outbuf; in unbzip2() local 46 if (outbuf == NULL) in unbzip2() 47 outbuf = malloc(BUFLEN); in unbzip2() 48 if (inbuf == NULL || outbuf == NULL) in unbzip2() 84 bzs.next_out = outbuf; in unbzip2() 106 n = write(out, outbuf, BUFLEN - bzs.avail_out); in unbzip2()
|
| /freebsd/sys/fs/smbfs/ |
| H A D | smbfs_subr.c | 159 char outbuf[SMB_MAXFNAMELEN]; in smbfs_fname_tolocal() local 160 char *obuf = outbuf; in smbfs_fname_tolocal() 163 olen = sizeof(outbuf); in smbfs_fname_tolocal() 164 bzero(outbuf, sizeof(outbuf)); in smbfs_fname_tolocal() 186 *nmlen = sizeof(outbuf) - olen; in smbfs_fname_tolocal() 187 memcpy(name, outbuf, *nmlen); in smbfs_fname_tolocal()
|
| /freebsd/sys/sys/ |
| H A D | iconv.h | 158 size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 160 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype); 162 size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 164 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype); 180 char **outbuf, size_t *outbytesleft); 182 char **outbuf, size_t *outbytesleft, int casetype); 184 char **outbuf, size_t *outbytesleft); 186 char **outbuf, size_t *outbytesleft, int casetype);
|
| /freebsd/contrib/ofed/libibnetdisc/ |
| H A D | ibnetdisc_cache.c | 215 static size_t _unmarshall_buf(const void *inbuf, void *outbuf, unsigned int len) in _unmarshall_buf() argument 217 memcpy(outbuf, inbuf, len); in _unmarshall_buf() 721 static size_t _marshall8(uint8_t * outbuf, uint8_t num) in _marshall8() argument 723 outbuf[0] = num; in _marshall8() 728 static size_t _marshall16(uint8_t * outbuf, uint16_t num) in _marshall16() argument 730 outbuf[0] = num & 0x00FF; in _marshall16() 731 outbuf[1] = (num & 0xFF00) >> 8; in _marshall16() 736 static size_t _marshall32(uint8_t * outbuf, uint32_t num) in _marshall32() argument 738 outbuf[0] = num & 0x000000FF; in _marshall32() 739 outbuf[1] = (num & 0x0000FF00) >> 8; in _marshall32() [all …]
|