Home | History | Annotate | Download | only in guide

Lines Matching defs:bio

24 #include <openssl/bio.h>
28 /* Helper function to create a BIO connected to the server */
29 static BIO *create_socket_bio(const char *hostname, const char *port,
35 BIO *bio;
92 /* Create a BIO to wrap the socket */
93 bio = BIO_new(BIO_s_datagram());
94 if (bio == NULL) {
100 * Associate the newly created BIO with the underlying socket. By
102 * the BIO is freed. Alternatively you can use BIO_NOCLOSE, in which
106 BIO_set_fd(bio, sock, BIO_CLOSE);
108 return bio;
121 BIO *bio = NULL;
182 * Create the underlying transport socket/BIO and associate it with the
185 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET, &peer_addr);
186 if (bio == NULL) {
187 printf("Failed to crete the BIO\n");
190 SSL_set_bio(ssl, bio, bio);
334 * Free the resources we allocated. We do not free the BIO object here
336 * via SSL_set_bio(). The BIO will be freed when we free the SSL object.