![]() In C we have this concept that an object should clean up its own resources. You still need a C review! Idioms/Patterns RAII idiom Printf("Connected with %s encryption\n", SSL_get_cipher(ssl)) Host is hardcoded to localhost for testing purposesĬonst int sfd = OpenConnection("127.0.0.1", argv) ĮRR_print_errors_fp(stderr) //High probability this doesn't do anythingįprintf(stderr, "SSL_connect failed with SSL_get_error code %d\n", status) Printf("Info: No client certificates configured.\n") ![]() X509 *cert = SSL_get_peer_certificate(ssl) /* get the server's certificate */Ĭhar *line = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0) If (connect(sfd, addr->ai_addr, addr->ai_addrlen) = 0)įprintf(stderr, "%s: %s\n", hostname, strerror(err)) Sfd = socket(addrs->ai_family, addrs->ai_socktype, addrs->ai_protocol) If ((host = gethostbyname(hostname)) = nullptr)Ĭonst int status = getaddrinfo(hostname, port,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |