Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 64) sorted by relevance

123

/openssl/include/internal/
H A Dktls.h55 static ossl_inline int ktls_enable(int fd) in ktls_enable() argument
73 return setsockopt(fd, IPPROTO_TCP, TCP_TXTLS_ENABLE, in ktls_start()
119 return sendmsg(fd, &msg, 0); in ktls_send_ctrl_message()
163 ret = recvmsg(fd, &msg, 0); in ktls_read_record()
205 ret = sendfile(fd, s, off, size, NULL, &sbytes, flags); in ktls_sendfile()
289 static ossl_inline int ktls_enable(int fd) in ktls_enable() argument
305 return setsockopt(fd, SOL_TLS, is_tx ? TLS_TX : TLS_RX, in ktls_start()
314 return setsockopt(fd, SOL_TLS, TLS_TX_ZEROCOPY_RO, in ktls_enable_tx_zerocopy_sendfile()
355 return sendmsg(fd, &msg, 0); in ktls_send_ctrl_message()
364 return sendfile(s, fd, &off, size); in ktls_sendfile()
[all …]
/openssl/crypto/async/
H A Dasync_wait.c33 curr->cleanup(ctx, curr->key, curr->fd, curr->custom_data); in ASYNC_WAIT_CTX_free()
44 OSSL_ASYNC_FD fd, void *custom_data, in ASYNC_WAIT_CTX_set_wait_fd() argument
54 fdlookup->fd = fd; in ASYNC_WAIT_CTX_set_wait_fd()
65 OSSL_ASYNC_FD *fd, void **custom_data) in ASYNC_WAIT_CTX_get_fd() argument
77 *fd = curr->fd; in ASYNC_WAIT_CTX_get_fd()
86 int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, in ASYNC_WAIT_CTX_get_all_fds() argument
99 if (fd != NULL) { in ASYNC_WAIT_CTX_get_all_fds()
100 *fd = curr->fd; in ASYNC_WAIT_CTX_get_all_fds()
101 fd++; in ASYNC_WAIT_CTX_get_all_fds()
125 *delfd = curr->fd; in ASYNC_WAIT_CTX_get_changed_fds()
[all …]
/openssl/doc/designs/ddd/
H A Dddd-03-fd-blocking.c50 SSL *new_conn(SSL_CTX *ctx, int fd, const char *bare_hostname) in new_conn() argument
63 if (SSL_set_fd(ssl, fd) <= 0) { in new_conn()
139 int rc, fd = -1, l, mlen, res = 1; in main() local
172 fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in main()
174 fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in main()
176 if (fd < 0) { in main()
181 rc = connect(fd, result->ai_addr, result->ai_addrlen); in main()
187 ssl = new_conn(ctx, fd, argv[1]); in main()
212 if (fd >= 0) in main()
213 close(fd); in main()
H A Dddd-04-fd-nonblocking.c16 int fd; member
76 if (SSL_set_fd(ssl, fd) <= 0) { in new_conn()
104 conn->fd = fd; in new_conn()
182 return conn->fd; in get_conn_fd()
296 int rc, fd = -1, res = 1; in main() local
340 fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in main()
344 if (fd < 0) { in main()
355 rc = fcntl(fd, F_SETFL, O_NONBLOCK); in main()
361 conn = new_conn(ctx, fd, argv[1]); in main()
391 pfd.fd = get_conn_fd(conn); in main()
[all …]
H A Dddd-05-mem-nonblocking.c297 static int pump(APP_CONN *conn, int fd, int events, int timeout) argument
304 pfd.fd = fd;
344 l2 = write(fd, buf, l);
355 int rc, fd = -1, res = 1; local
392 fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
394 fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
396 if (fd < 0) {
401 rc = connect(fd, result->ai_addr, result->ai_addrlen);
407 rc = fcntl(fd, F_SETFL, O_NONBLOCK);
428 if (pump(conn, fd, get_conn_pending_tx(conn), timeout) != 1) {
[all …]
H A DMakefile15 ddd-03-fd-blocking \
16 ddd-04-fd-nonblocking \
H A Dddd-02-conn-nonblocking-threads.c196 return d.value.fd; in get_conn_fd()
300 pfd.fd = get_conn_fd(conn); in main()
318 pfd.fd = get_conn_fd(conn); in main()
/openssl/providers/implementations/rands/seeding/
H A Drand_unix.c407 int fd; member
435 int shm_id, fd, r; in wait_random_seeded() local
512 return rd->fd != -1 in check_random_device()
530 return rd->fd; in get_random_device()
534 return rd->fd; in get_random_device()
543 close(rd->fd); in get_random_device()
544 rd->fd = -1; in get_random_device()
547 return rd->fd; in get_random_device()
558 close(rd->fd); in close_random_device()
559 rd->fd = -1; in close_random_device()
[all …]
/openssl/crypto/rand/
H A Drand_egd.c113 int mybuffer, ret = -1, i, numbytes, fd; in RAND_query_egd_bytes() local
127 fd = hpns_socket(AF_UNIX, SOCK_STREAM, 0, AF_UNIX_COMPATIBILITY); in RAND_query_egd_bytes()
129 fd = socket(AF_UNIX, SOCK_STREAM, 0); in RAND_query_egd_bytes()
131 if (fd == -1 || (fp = fdopen(fd, "r+")) == NULL) in RAND_query_egd_bytes()
137 if (connect(fd, (struct sockaddr *)&addr, i) == 0) in RAND_query_egd_bytes()
162 close(fd); in RAND_query_egd_bytes()
163 fd = hpns_socket(AF_UNIX, SOCK_STREAM, 0, AF_UNIX_PORTABILITY); in RAND_query_egd_bytes()
164 if (fd == -1) in RAND_query_egd_bytes()
H A Drandfile.c211 int fd = open(file, O_WRONLY | O_CREAT | O_BINARY, 0600); in RAND_write_file() local
213 if (fd != -1) { in RAND_write_file()
214 out = fdopen(fd, "wb"); in RAND_write_file()
216 close(fd); in RAND_write_file()
/openssl/doc/man3/
H A DSSL_set_fd.pod11 int SSL_set_fd(SSL *ssl, int fd);
12 int SSL_set_rfd(SSL *ssl, int fd);
13 int SSL_set_wfd(SSL *ssl, int fd);
17 SSL_set_fd() sets the file descriptor B<fd> as the input/output facility
18 for the TLS/SSL (encrypted) side of B<ssl>. B<fd> will typically be the
22 interface between the B<ssl> and B<fd>. The BIO and hence the SSL engine
23 inherit the behaviour of B<fd>. If B<fd> is nonblocking, the B<ssl> will
56 passing the socket handle to SSL_set_*fd(). For the time being, this warning can
H A DBIO_s_fd.pod13 int BIO_set_fd(BIO *b, int fd, int c);
16 BIO *BIO_new_fd(int fd, int close_flag);
30 such as by using B<lseek(fd, 0, 0)>.
33 such as by using B<lseek(fd, ofs, 0)>.
36 B<lseek(fd, 0, 1)>.
38 BIO_set_fd() sets the file descriptor of BIO B<b> to B<fd> and the close
44 BIO_new_fd() returns a file descriptor BIO using B<fd> and B<close_flag>.
H A DASYNC_WAIT_CTX_new.pod26 OSSL_ASYNC_FD fd,
31 OSSL_ASYNC_FD *fd, void **custom_data);
32 int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
66 associated with that job in I<*fd>. The number of file descriptors returned will
68 sufficient memory has been allocated in I<*fd> to receive all the file
69 descriptors. Calling ASYNC_WAIT_CTX_get_all_fds() with a NULL I<fd> value will
74 ever return one fd. If multiple asynchronous engines are being used then more
87 stable fd for the lifetime of the B<ASYNC_WAIT_CTX> in order to reduce the
110 the fd or any other resources. Note: The "cleanup" routine does not get called
111 if the fd is cleared directly via a call to ASYNC_WAIT_CTX_clear_fd().
/openssl/crypto/bio/
H A Dbio_sock.c212 int BIO_socket_ioctl(int fd, long type, void *arg) in BIO_socket_ioctl() argument
217 i = ioctlsocket(fd, type, (char *)arg); in BIO_socket_ioctl()
243 i = ioctlsocket(fd, type, ARG); in BIO_socket_ioctl()
431 int BIO_socket_wait(int fd, int for_read, time_t max_time) in BIO_socket_wait() argument
439 if ((SOCKET)fd == INVALID_SOCKET) in BIO_socket_wait()
441 if (fd < 0 || fd >= FD_SETSIZE) in BIO_socket_wait()
452 openssl_fdset(fd, &confds); in BIO_socket_wait()
455 return select(fd + 1, for_read ? &confds : NULL, in BIO_socket_wait()
461 if (fd < 0) in BIO_socket_wait()
470 confds.fd = fd; in BIO_socket_wait()
H A Dbss_file.c233 int fd = _fileno((FILE *)ptr); in file_ctrl() local
235 _setmode(fd, _O_TEXT); in file_ctrl()
237 _setmode(fd, _O_BINARY); in file_ctrl()
248 int fd = fileno((FILE *)ptr); in file_ctrl()
251 _setmode(fd, _O_TEXT); in file_ctrl()
254 if (fd == STDIN_FILENO || fd == STDOUT_FILENO) { in file_ctrl()
255 if (isatty(fd) <= 0) in file_ctrl()
256 _setmode(fd, _O_BINARY); in file_ctrl()
258 _setmode(fd, _O_BINARY); in file_ctrl()
261 int fd = fileno((FILE *)ptr); in file_ctrl()
[all …]
H A Dbss_sock.c67 BIO *BIO_new_socket(int fd, int close_flag) in BIO_new_socket() argument
74 BIO_set_fd(ret, fd, close_flag); in BIO_new_socket()
83 ktls_enable(fd); in BIO_new_socket()
229 pd->value.fd = b->num; in sock_ctrl()
H A Dbss_fd.c19 BIO *BIO_new_fd(int fd, int close_flag) in BIO_new_fd() argument
80 BIO *BIO_new_fd(int fd, int close_flag) in BIO_new_fd() argument
86 BIO_set_fd(ret, fd, close_flag); in BIO_new_fd()
/openssl/ssl/quic/
H A Dquic_reactor.c248 pfds[npfd].fd = rfd; in poll_two_fds()
254 pfds[npfd].fd = rfd; in poll_two_fds()
259 pfds[npfd].fd = wfd; in poll_two_fds()
295 static int poll_descriptor_to_fd(const BIO_POLL_DESCRIPTOR *d, int *fd) in poll_descriptor_to_fd() argument
298 *fd = INVALID_SOCKET; in poll_descriptor_to_fd()
303 || d->value.fd == INVALID_SOCKET) in poll_descriptor_to_fd()
306 *fd = d->value.fd; in poll_descriptor_to_fd()
/openssl/apps/
H A Ds_time.c130 int min_version = 0, max_version = 0, ver, buf_len, fd; in s_time_main() local
344 if ((fd = SSL_get_fd(scon)) >= 0) in s_time_main()
345 BIO_closesocket(fd); in s_time_main()
372 if ((fd = SSL_get_fd(scon)) >= 0) in s_time_main()
373 BIO_closesocket(fd); in s_time_main()
458 int fd; in doConnection() local
462 fd = SSL_get_fd(serverCon); in doConnection()
463 if (fd >= 0) in doConnection()
464 (void)setsockopt(fd, SOL_SOCKET, SO_LINGER, (char*)&no_linger, in doConnection()
/openssl/include/openssl/
H A Dasync.h59 OSSL_ASYNC_FD fd,
64 OSSL_ASYNC_FD *fd, void **custom_data);
65 int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
/openssl/test/
H A Ddrbgtest.c336 int fd[2]; in test_drbg_reseed_in_child() local
340 if (!TEST_int_ge(pipe(fd), 0)) in test_drbg_reseed_in_child()
344 close(fd[0]); in test_drbg_reseed_in_child()
345 close(fd[1]); in test_drbg_reseed_in_child()
350 close(fd[1]); in test_drbg_reseed_in_child()
355 && TEST_true(read(fd[0], &random[0], sizeof(random)) in test_drbg_reseed_in_child()
372 close(fd[0]); in test_drbg_reseed_in_child()
379 close(fd[0]); in test_drbg_reseed_in_child()
385 && TEST_true(write(fd[1], random, sizeof(random)) in test_drbg_reseed_in_child()
392 close(fd[1]); in test_drbg_reseed_in_child()
H A Dasynctest.c258 OSSL_ASYNC_FD fd = OSSL_BAD_ASYNC_FD, delfd = OSSL_BAD_ASYNC_FD; in test_ASYNC_WAIT_CTX_get_all_fds() local
277 || !ASYNC_WAIT_CTX_get_all_fds(waitctx, &fd, &numfds) in test_ASYNC_WAIT_CTX_get_all_fds()
278 || fd != MAGIC_WAIT_FD in test_ASYNC_WAIT_CTX_get_all_fds()
279 || (fd = OSSL_BAD_ASYNC_FD, 0) /* Assign to something else */ in test_ASYNC_WAIT_CTX_get_all_fds()
284 || !ASYNC_WAIT_CTX_get_changed_fds(waitctx, &fd, &numfds, NULL, in test_ASYNC_WAIT_CTX_get_all_fds()
286 || fd != MAGIC_WAIT_FD in test_ASYNC_WAIT_CTX_get_all_fds()
/openssl/test/certs/
H A DrootCA.pem24 20:c3:fd:17:cf:91:3d:63:10:1c:14:5b:fb:c3:a8:
29 ad:fd:df:8d:b4:0b:af:7e:41:e0:21:3c:c8:33:45:
30 49:84:2f:93:06:ee:fd:4f:ed:4f:f3:bc:9b:de:fc:
49 22:59:6a:94:dc:61:34:88:28:58:9f:de:fd:71:1e:37:af:90:
55 2d:29:a3:21:88:fd:14:48:0d:99:8c:d8:f8:c8:c7:ec:d2:83:
/openssl/test/recipes/30-test_evp_pkey_provided/
H A DDSA.pub.txt7 13:1c:b2:52:15:fd:9b:d5:40:4a:1a:da:29:4c:92:
17 2c:50:41:f1:7e:c6:81:c4:51:f1:fd:d6:86:f7:69:
36 6c:c5:72:eb:b7:56:f5:6b:60:8f:c2:fd:3f:46:5c:
46 d2:92:5b:29:5c:61:b8:c9:2b:d6:f7:59:fd:d8:70:
H A DDSA.priv.txt11 13:1c:b2:52:15:fd:9b:d5:40:4a:1a:da:29:4c:92:
21 2c:50:41:f1:7e:c6:81:c4:51:f1:fd:d6:86:f7:69:
40 6c:c5:72:eb:b7:56:f5:6b:60:8f:c2:fd:3f:46:5c:
50 d2:92:5b:29:5c:61:b8:c9:2b:d6:f7:59:fd:d8:70:

Completed in 41 milliseconds

123