Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1753168695, "reponame":"openssl", "desc":"OpenSSL", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl", "f":3, "items": [ {"schema":"libjg2-1", "cid":"00a6b72a1cef3cd6104b823cd0716425", "commit": {"type":"commit", "time": 1486133394, "time_ofs": 18446744073709551316, "oid_tree": { "oid": "8b3b00f071c4940a97e4a8e370e82758978451f4", "alias": []}, "oid":{ "oid": "8f85aa6bd3737547634bbbe1e141f728674fb594", "alias": []}, "msg": "Add NNTP support (RFC 4642) to s_client (\u0022-starttls nntp\u0022)", "sig_commit": { "git_time": { "time": 1486133394, "offset": -300 }, "name": "Rich Salz", "email": "rsalz@openssl.org", "md5": "3ed6b9cf7bbe83902a044f6590346d26" }, "sig_author": { "git_time": { "time": 1485561147, "offset": 60 }, "name": "Robert Scheck", "email": "robert@fedoraproject.org", "md5": "de57fd7b8f5f9a500e1736cdf7889bda" }}, "body": "Add NNTP support (RFC 4642) to s_client (\u0022-starttls nntp\u0022)\n\nReviewed-by: Andy Polyakov \u003cappro@openssl.org\u003e\nReviewed-by: Rich Salz \u003crsalz@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/2310)" , "diff": "diff --git a/apps/s_client.c b/apps/s_client.c\nindex 99770b9..d9dbe70 100644\n--- a/apps/s_client.c\n+++ b/apps/s_client.c\n@@ -746,7 +746,8 @@ typedef enum PROTOCOL_choice {\n PROTO_CONNECT,\n PROTO_IRC,\n PROTO_POSTGRES,\n- PROTO_LMTP\n+ PROTO_LMTP,\n+ PROTO_NNTP\n } PROTOCOL_CHOICE;\n \n static const OPT_PAIR services[] \u003d {\n@@ -760,6 +761,7 @@ static const OPT_PAIR services[] \u003d {\n {\u0022irc\u0022, PROTO_IRC},\n {\u0022postgres\u0022, PROTO_POSTGRES},\n {\u0022lmtp\u0022, PROTO_LMTP},\n+ {\u0022nntp\u0022, PROTO_NNTP},\n {NULL, 0}\n };\n \n@@ -2172,6 +2174,33 @@ int s_client_main(int argc, char **argv)\n goto shut;\n }\n break;\n+ case PROTO_NNTP:\n+ {\n+ int foundit \u003d 0;\n+ BIO *fbio \u003d BIO_new(BIO_f_buffer());\n+\n+ BIO_push(fbio, sbio);\n+ BIO_gets(fbio, mbuf, BUFSIZZ);\n+ /* STARTTLS command requires CAPABILITIES... */\n+ BIO_printf(fbio, \u0022CAPABILITIES\u005cr\u005cn\u0022);\n+ (void)BIO_flush(fbio);\n+ /* wait for multi-line CAPABILITIES response */\n+ do {\n+ mbuf_len \u003d BIO_gets(fbio, mbuf, BUFSIZZ);\n+ if (strstr(mbuf, \u0022STARTTLS\u0022))\n+ foundit \u003d 1;\n+ } while (mbuf_len \u003e 1 \u0026\u0026 mbuf[0] !\u003d '.');\n+ (void)BIO_flush(fbio);\n+ BIO_pop(fbio);\n+ BIO_free(fbio);\n+ if (!foundit)\n+ BIO_printf(bio_err,\n+ \u0022Didn't find STARTTLS in server response,\u0022\n+ \u0022 trying anyway...\u005cn\u0022);\n+ BIO_printf(sbio, \u0022STARTTLS\u005cr\u005cn\u0022);\n+ BIO_read(sbio, sbuf, BUFSIZZ);\n+ }\n+ break;\n }\n \n for (;;) {\ndiff --git a/doc/man1/s_client.pod b/doc/man1/s_client.pod\nindex 2ebd682..fb1680a 100644\n--- a/doc/man1/s_client.pod\n+++ b/doc/man1/s_client.pod\n@@ -437,7 +437,7 @@ command for more information.\n send the protocol-specific message(s) to switch to TLS for communication.\n B\u003cprotocol\u003e is a keyword for the intended protocol. Currently, the only\n supported keywords are \u0022smtp\u0022, \u0022pop3\u0022, \u0022imap\u0022, \u0022ftp\u0022, \u0022xmpp\u0022, \u0022xmpp-server\u0022,\n-\u0022irc\u0022, \u0022postgres\u0022 and \u0022lmtp\u0022.\n+\u0022irc\u0022, \u0022postgres\u0022, \u0022lmtp\u0022 and \u0022nntp\u0022.\n \n \u003ditem B\u003c-xmpphost hostname\u003e\n \n","s":{"c":1753168695,"u": 29095}} ],"g": 30507,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}