diff options
author | erdgeist <de@gsmk.de> | 2014-04-15 14:42:24 +0200 |
---|---|---|
committer | erdgeist <de@gsmk.de> | 2014-04-15 14:42:24 +0200 |
commit | 66a81e9382c8503a48db8f82aeb59b6c612c4964 (patch) | |
tree | 78c9d53aa810154d5ef0f9215d86357b364c2643 | |
parent | 7e81cd818c751e0f75b2c637e37356485e1e71ef (diff) | |
parent | 19375e6c61bfe3bf643786b0e7318c528e4b22a0 (diff) |
Display cipher list, thanks to count
-rwxr-xr-x | README | 7 | ||||
-rwxr-xr-x | debian/control | 2 | ||||
-rwxr-xr-x | vchat-client.sgml | 9 | ||||
-rwxr-xr-x | vchat-howto | 5 | ||||
-rwxr-xr-x | vchat-keygen | 6 | ||||
-rwxr-xr-x | vchat-protocol.c | 8 | ||||
-rwxr-xr-x | vchat-ssl.c | 18 |
7 files changed, 36 insertions, 19 deletions
@@ -2,16 +2,15 @@ Hi! | |||
2 | 2 | ||
3 | this is vchat-client, a GPLed (SSL) client for the vchat protocol. | 3 | this is vchat-client, a GPLed (SSL) client for the vchat protocol. |
4 | 4 | ||
5 | You can get the most recent version of vchat-client via CVS, e.g: | 5 | You can get the most recent version of vchat-client via git, e.g: |
6 | 6 | ||
7 | cvs -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot login | 7 | git clone git://erdgeist.org/vchat-client |
8 | cvs -z3 -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co vchat-client | ||
9 | 8 | ||
10 | (press return at password prompt) | 9 | (press return at password prompt) |
11 | 10 | ||
12 | no autoconf yet, sorry. required libs: | 11 | no autoconf yet, sorry. required libs: |
13 | 12 | ||
14 | openssl (0.9.6+ preferred) | 13 | openssl (1.0.1g+ preferred) |
15 | readline (4.2+ preferred) | 14 | readline (4.2+ preferred) |
16 | ncurses (5.2 preferred) | 15 | ncurses (5.2 preferred) |
17 | 16 | ||
diff --git a/debian/control b/debian/control index d106fd5..3ba3fcd 100755 --- a/debian/control +++ b/debian/control | |||
@@ -2,7 +2,7 @@ Source: vchat-client | |||
2 | Section: unknown | 2 | Section: unknown |
3 | Priority: optional | 3 | Priority: optional |
4 | Maintainer: Andreas Kotes <count@flatline.de> | 4 | Maintainer: Andreas Kotes <count@flatline.de> |
5 | Build-Depends: debhelper (>> 3.0.0), libreadline4-dev, libncurses-dev, libssl-dev, docbook-to-man | 5 | Build-Depends: debhelper (>> 3.0.0), libreadline-dev, libncurses-dev, libssl-dev, docbook-to-man |
6 | Standards-Version: 3.5.2 | 6 | Standards-Version: 3.5.2 |
7 | 7 | ||
8 | Package: vchat-client | 8 | Package: vchat-client |
diff --git a/vchat-client.sgml b/vchat-client.sgml index ee0dc36..4b4f130 100755 --- a/vchat-client.sgml +++ b/vchat-client.sgml | |||
@@ -262,16 +262,15 @@ TAB nick completion | |||
262 | <refsect1> | 262 | <refsect1> |
263 | <title>DEVEL</title> | 263 | <title>DEVEL</title> |
264 | 264 | ||
265 | <para>You can get the most recent version of vchat-client via CVS, e.g: | 265 | <para>You can get the most recent version of vchat-client via git, e.g: |
266 | <screen> | 266 | <screen> |
267 | <prompt>$ </prompt><userinput>cvs -d:pserver:anonymous@pulse.flatline.de:/home/cvsroot login</userinput> | 267 | <prompt>$ </prompt><userinput>git clone git://erdgeist.org/vchat-client</userinput> |
268 | <prompt>$ </prompt><userinput>cvs -z3 -d:pserver:anonymous@pulse.flatline.de:/home/cvsroot co vchat-client</userinput> | ||
269 | </screen> | 268 | </screen> |
270 | </para> | 269 | </para> |
271 | 270 | ||
272 | <para>(press return at password prompt) no autoconf yet, sorry. required libs: | 271 | <para>(press return at password prompt) no autoconf yet, sorry. required libs: |
273 | <literallayout> | 272 | <literallayout> |
274 | - openssl (0.9.6+ preferred) | 273 | - openssl (1.0.1g+ preferred) |
275 | - readline (4.2+ preferred) | 274 | - readline (4.2+ preferred) |
276 | - ncurses (5.2 preferred) | 275 | - ncurses (5.2 preferred) |
277 | </literallayout> | 276 | </literallayout> |
@@ -337,7 +336,7 @@ the admins has to be logged in.</para> | |||
337 | <refsect1> | 336 | <refsect1> |
338 | 337 | ||
339 | <title>SEE ALSO</title> | 338 | <title>SEE ALSO</title> |
340 | <para>gcc (1), cvs (1).</para> | 339 | <para>gcc (1), git (1).</para> |
341 | 340 | ||
342 | </refsect1> | 341 | </refsect1> |
343 | 342 | ||
diff --git a/vchat-howto b/vchat-howto index 22c34b7..0ace213 100755 --- a/vchat-howto +++ b/vchat-howto | |||
@@ -4,13 +4,12 @@ Newbies Guide to vchat via 'Buntclient' | |||
4 | 1. Get the Source, Luke | 4 | 1. Get the Source, Luke |
5 | ----------------------- | 5 | ----------------------- |
6 | 6 | ||
7 | Make sure, you got a shell and the tool called cvs. | 7 | Make sure, you got a shell and the tool called git. |
8 | cd to a directory the source shall reside in. | 8 | cd to a directory the source shall reside in. |
9 | 9 | ||
10 | Type: | 10 | Type: |
11 | 11 | ||
12 | $ cvs -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot login | 12 | $ git clone git://erdgeist.org/vchat-client |
13 | $ cvs -z3 -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co vchat-client | ||
14 | 13 | ||
15 | (press return at password prompt) | 14 | (press return at password prompt) |
16 | 15 | ||
diff --git a/vchat-keygen b/vchat-keygen index fa92c60..91fcbba 100755 --- a/vchat-keygen +++ b/vchat-keygen | |||
@@ -29,7 +29,7 @@ if [ ! -e $KEYBASE.key ]; then | |||
29 | echo "vchat-keygen: generating RSA key $KEYBASE.key" | 29 | echo "vchat-keygen: generating RSA key $KEYBASE.key" |
30 | echo "vchat-keygen: please set passphrase for local security" | 30 | echo "vchat-keygen: please set passphrase for local security" |
31 | umask 0077 | 31 | umask 0077 |
32 | openssl genrsa -des3 -out $KEYBASE.key 2048 | 32 | openssl genrsa -des3 -out $KEYBASE.key 4096 |
33 | else | 33 | else |
34 | echo "vchat-keygen: private key $KEYBASE.key exists" | 34 | echo "vchat-keygen: private key $KEYBASE.key exists" |
35 | fi | 35 | fi |
@@ -40,7 +40,7 @@ fi | |||
40 | echo "vchat-keygen: generating config-file for self-signing $KEYBASE.ca.keyconf" | 40 | echo "vchat-keygen: generating config-file for self-signing $KEYBASE.ca.keyconf" |
41 | cat >$KEYBASE.ca.keyconf <<EOT | 41 | cat >$KEYBASE.ca.keyconf <<EOT |
42 | [ req ] | 42 | [ req ] |
43 | default_bits = 2048 | 43 | default_bits = 4096 |
44 | default_keyfile = user.key | 44 | default_keyfile = user.key |
45 | distinguished_name = req_distinguished_name | 45 | distinguished_name = req_distinguished_name |
46 | string_mask = nombstr | 46 | string_mask = nombstr |
@@ -57,7 +57,7 @@ EOT | |||
57 | fi | 57 | fi |
58 | echo "vchat-keygen: generating Certificate Signing Request $KEYBASE.csr" | 58 | echo "vchat-keygen: generating Certificate Signing Request $KEYBASE.csr" |
59 | echo "vchat-keygen: please enter your nickname at the 'Name []:' prompt" | 59 | echo "vchat-keygen: please enter your nickname at the 'Name []:' prompt" |
60 | openssl req -new -config $KEYBASE.ca.keyconf -key $KEYBASE.key -out $KEYBASE.csr | 60 | openssl req -new -sha1 -config $KEYBASE.ca.keyconf -key $KEYBASE.key -out $KEYBASE.csr |
61 | echo "vchat-keygen: send this ($KEYBASE.csr) Certificate Signing Request to | 61 | echo "vchat-keygen: send this ($KEYBASE.csr) Certificate Signing Request to |
62 | vchat@vchat.berlin.ccc.de to get it signed by the vchat-CA. You will | 62 | vchat@vchat.berlin.ccc.de to get it signed by the vchat-CA. You will |
63 | receive your signed Certificate shortly." | 63 | receive your signed Certificate shortly." |
diff --git a/vchat-protocol.c b/vchat-protocol.c index b50f511..e676b28 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c | |||
@@ -166,8 +166,11 @@ vcconnect (char *server, char *port) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | /* upgrade our plain BIO to ssl */ | 168 | /* upgrade our plain BIO to ssl */ |
169 | if( vc_connect_ssl( &server_conn, &vc_store ) ) | 169 | if( vc_connect_ssl( &server_conn, &vc_store ) ) { |
170 | BIO_free_all( server_conn ); | 170 | BIO_free_all( server_conn ); |
171 | server_conn = NULL; | ||
172 | errno = EIO; | ||
173 | } | ||
171 | } | 174 | } |
172 | 175 | ||
173 | if( !server_conn ) { | 176 | if( !server_conn ) { |
@@ -188,7 +191,8 @@ vcconnect (char *server, char *port) | |||
188 | /* disconnect from server */ | 191 | /* disconnect from server */ |
189 | void | 192 | void |
190 | vcdisconnect () { | 193 | vcdisconnect () { |
191 | BIO_free_all( server_conn ); | 194 | if (server_conn) |
195 | BIO_free_all( server_conn ); | ||
192 | serverfd = -1; | 196 | serverfd = -1; |
193 | } | 197 | } |
194 | 198 | ||
diff --git a/vchat-ssl.c b/vchat-ssl.c index 41b0278..64886ca 100755 --- a/vchat-ssl.c +++ b/vchat-ssl.c | |||
@@ -137,8 +137,24 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store ) | |||
137 | BIO_push( ssl_conn, *conn ); | 137 | BIO_push( ssl_conn, *conn ); |
138 | *conn = ssl_conn; | 138 | *conn = ssl_conn; |
139 | fflush(stdout); | 139 | fflush(stdout); |
140 | if( BIO_do_handshake( *conn ) > 0 ) | 140 | if( BIO_do_handshake( *conn ) > 0 ) { |
141 | /* Show information about cipher used */ | ||
142 | const SSL *sslp = NULL; | ||
143 | const SSL_CIPHER * cipher = NULL; | ||
144 | |||
145 | /* Get cipher object */ | ||
146 | BIO_get_ssl(ssl_conn, &sslp); | ||
147 | cipher = SSL_get_current_cipher(sslp); | ||
148 | if (cipher) { | ||
149 | char cipher_desc[TMPSTRSIZE]; | ||
150 | snprintf(tmpstr, TMPSTRSIZE, "[SSL CIPHER] %s", SSL_CIPHER_description(cipher, cipher_desc, TMPSTRSIZE)); | ||
151 | writecf(FS_SERV, tmpstr); | ||
152 | } else { | ||
153 | snprintf(tmpstr, TMPSTRSIZE, "[SSL ERROR] Cipher not known / SSL object can't be queried!"); | ||
154 | writecf(FS_ERR, tmpstr); | ||
155 | } | ||
141 | return 0; | 156 | return 0; |
157 | } | ||
142 | } | 158 | } |
143 | 159 | ||
144 | snprintf(tmpstr, TMPSTRSIZE, "[SSL ERROR] %s", ERR_error_string (ERR_get_error (), NULL)); | 160 | snprintf(tmpstr, TMPSTRSIZE, "[SSL ERROR] %s", ERR_error_string (ERR_get_error (), NULL)); |