Home
last modified time | relevance | path

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

12

/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()
76 return setsockopt(fd, IPPROTO_TCP, TCP_RXTLS_ENABLE, tls_en, in ktls_start()
113 return sendmsg(fd, &msg, 0); in ktls_send_ctrl_message()
157 ret = recvmsg(fd, &msg, 0); in ktls_read_record()
199 ret = sendfile(fd, s, off, size, NULL, &sbytes, flags); in ktls_sendfile()
276 static ossl_inline int ktls_enable(int fd) in ktls_enable() argument
292 return setsockopt(fd, SOL_TLS, is_tx ? TLS_TX : TLS_RX, in ktls_start()
330 return sendmsg(fd, &msg, 0); in ktls_send_ctrl_message()
339 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
56 fdlookup->fd = fd; in ASYNC_WAIT_CTX_set_wait_fd()
67 OSSL_ASYNC_FD *fd, void **custom_data) in ASYNC_WAIT_CTX_get_fd() argument
79 *fd = curr->fd; in ASYNC_WAIT_CTX_get_fd()
88 int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, in ASYNC_WAIT_CTX_get_all_fds() argument
101 if (fd != NULL) { in ASYNC_WAIT_CTX_get_all_fds()
102 *fd = curr->fd; in ASYNC_WAIT_CTX_get_all_fds()
103 fd++; in ASYNC_WAIT_CTX_get_all_fds()
127 *delfd = curr->fd; in ASYNC_WAIT_CTX_get_changed_fds()
[all …]
/openssl/doc/designs/ddd/
H A Dddd-04-fd-nonblocking.c16 int fd; member
69 if (SSL_set_fd(ssl, fd) <= 0) { in new_conn()
87 conn->fd = fd; in new_conn()
165 return conn->fd; in get_conn_fd()
225 int rc, fd = -1, res = 1; in main() local
252 fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in main()
253 if (fd < 0) { in main()
264 rc = fcntl(fd, F_SETFL, O_NONBLOCK); in main()
270 conn = new_conn(ctx, fd, "www.openssl.org"); in main()
287 pfd.fd = get_conn_fd(conn); in main()
[all …]
H A Dddd-03-fd-blocking.c46 SSL *new_conn(SSL_CTX *ctx, int fd, const char *bare_hostname) in new_conn() argument
56 if (SSL_set_fd(ssl, fd) <= 0) { in new_conn()
123 int rc, fd = -1, l, res = 1; in main() local
147 fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in main()
148 if (fd < 0) { in main()
153 rc = connect(fd, result->ai_addr, result->ai_addrlen); in main()
159 ssl = new_conn(ctx, fd, "www.openssl.org"); in main()
183 if (fd >= 0) in main()
184 close(fd); in main()
H A Dddd-05-mem-nonblocking.c259 static int pump(APP_CONN *conn, int fd, int events, int timeout) in pump() argument
266 pfd.fd = fd; in pump()
281 l = read(fd, buf, wspace > sizeof(buf) ? sizeof(buf) : wspace); in pump()
306 l2 = write(fd, buf, l); in pump()
317 int rc, fd = -1, res = 1; in main() local
344 fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in main()
345 if (fd < 0) { in main()
350 rc = connect(fd, result->ai_addr, result->ai_addrlen); in main()
356 rc = fcntl(fd, F_SETFL, O_NONBLOCK); in main()
377 if (pump(conn, fd, get_conn_pending_tx(conn), timeout) != 1) { in main()
[all …]
H A DMakefile6 TESTS=ddd-01-conn-blocking ddd-02-conn-nonblocking ddd-03-fd-blocking ddd-04-fd-nonblocking ddd-05-…
H A DREADME.md90 * AOSFx: Application owns, calls SSL_set_[rw]fd, different FDs for read/write.
109 | [ddd-03-fd-blocking](ddd-03-fd-blocking.c) | S-AOSF | A `SSL_set_fd`-based blocking example demon…
110 | [ddd-04-fd-nonblocking](ddd-04-fd-nonblocking.c) | A-AOSF | A `SSL_set_fd`-based non-blocking exa…
H A Dddd-02-conn-nonblocking.c255 pfd.fd = get_conn_fd(conn); in main()
273 pfd.fd = get_conn_fd(conn); in main()
/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.c210 int fd = open(file, O_WRONLY | O_CREAT | O_BINARY, 0600); in RAND_write_file() local
211 if (fd != -1) in RAND_write_file()
212 out = fdopen(fd, "wb"); in RAND_write_file()
/openssl/providers/implementations/rands/seeding/
H A Drand_unix.c410 int fd; member
438 int shm_id, fd, r; in wait_random_seeded() local
515 return rd->fd != -1 in check_random_device()
533 return rd->fd; in get_random_device()
537 return rd->fd; in get_random_device()
546 close(rd->fd); in get_random_device()
547 rd->fd = -1; in get_random_device()
550 return rd->fd; in get_random_device()
561 close(rd->fd); in close_random_device()
562 rd->fd = -1; in close_random_device()
[all …]
/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
52 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 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 Dbio_sock.c175 int BIO_socket_ioctl(int fd, long type, void *arg) in BIO_socket_ioctl() argument
180 i = ioctlsocket(fd, type, (char *)arg); in BIO_socket_ioctl()
206 i = ioctlsocket(fd, type, ARG); in BIO_socket_ioctl()
393 int BIO_socket_wait(int fd, int for_read, time_t max_time) in BIO_socket_wait() argument
399 if (fd < 0 || fd >= FD_SETSIZE) in BIO_socket_wait()
409 openssl_fdset(fd, &confds); in BIO_socket_wait()
412 return select(fd + 1, for_read ? &confds : NULL, in BIO_socket_wait()
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()
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()
/openssl/apps/
H A Ds_time.c130 int min_version = 0, max_version = 0, ver, buf_len, fd; in s_time_main() local
345 if ((fd = SSL_get_fd(scon)) >= 0) in s_time_main()
346 BIO_closesocket(fd); in s_time_main()
373 if ((fd = SSL_get_fd(scon)) >= 0) in s_time_main()
374 BIO_closesocket(fd); in s_time_main()
459 int fd; in doConnection() local
463 fd = SSL_get_fd(serverCon); in doConnection()
464 if (fd >= 0) in doConnection()
465 (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.c334 int fd[2]; in test_drbg_reseed_in_child() local
338 if (!TEST_int_ge(pipe(fd), 0)) in test_drbg_reseed_in_child()
342 close(fd[0]); in test_drbg_reseed_in_child()
343 close(fd[1]); in test_drbg_reseed_in_child()
348 close(fd[1]); in test_drbg_reseed_in_child()
353 && TEST_true(read(fd[0], &random[0], sizeof(random)) in test_drbg_reseed_in_child()
370 close(fd[0]); in test_drbg_reseed_in_child()
377 close(fd[0]); in test_drbg_reseed_in_child()
383 && TEST_true(write(fd[1], random, sizeof(random)) in test_drbg_reseed_in_child()
390 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/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:
H A DED448.pub.txt3 5f:d7:44:9b:59:b4:61:fd:2c:e7:87:ec:61:6a:d4:

Completed in 325 milliseconds

12