LEFT | RIGHT |
(no file at all) | |
1 #include <u.h> | 1 #include <u.h> |
2 #include <libc.h> | 2 #include <libc.h> |
3 #include <bio.h> | 3 #include <bio.h> |
4 #include <auth.h> | 4 #include <auth.h> |
5 #include <mp.h> | 5 #include <mp.h> |
6 #include <libsec.h> | 6 #include <libsec.h> |
7 | 7 |
8 /* The main groups of functions are: */ | 8 /* The main groups of functions are: */ |
9 /* client/server - main handshake protocol definition */ | 9 /* client/server - main handshake protocol definition */ |
10 /* message functions - formating handshake messages */ | 10 /* message functions - formating handshake messages */ |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 } | 1394 } |
1395 | 1395 |
1396 /* free memory associated with TlsConnection struct */ | 1396 /* free memory associated with TlsConnection struct */ |
1397 /* (but don't close the TLS channel itself) */ | 1397 /* (but don't close the TLS channel itself) */ |
1398 static void | 1398 static void |
1399 tlsConnectionFree(TlsConnection *c) | 1399 tlsConnectionFree(TlsConnection *c) |
1400 { | 1400 { |
1401 tlsSecClose(c->sec); | 1401 tlsSecClose(c->sec); |
1402 freebytes(c->sid); | 1402 freebytes(c->sid); |
1403 freebytes(c->cert); | 1403 freebytes(c->cert); |
1404 » memset(c, 0, sizeof(c)); | 1404 » memset(c, 0, sizeof(*c)); |
1405 free(c); | 1405 free(c); |
1406 } | 1406 } |
1407 | 1407 |
1408 | 1408 |
1409 /*================= cipher choices ======================== */ | 1409 /*================= cipher choices ======================== */ |
1410 | 1410 |
1411 static int weakCipher[CipherMax] = | 1411 static int weakCipher[CipherMax] = |
1412 { | 1412 { |
1413 1, /* TLS_NULL_WITH_NULL_NULL */ | 1413 1, /* TLS_NULL_WITH_NULL_NULL */ |
1414 1, /* TLS_RSA_WITH_NULL_MD5 */ | 1414 1, /* TLS_RSA_WITH_NULL_MD5 */ |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 return ans; | 2298 return ans; |
2299 } | 2299 } |
2300 */ | 2300 */ |
2301 | 2301 |
2302 static void | 2302 static void |
2303 freeints(Ints* b) | 2303 freeints(Ints* b) |
2304 { | 2304 { |
2305 if(b != nil) | 2305 if(b != nil) |
2306 free(b); | 2306 free(b); |
2307 } | 2307 } |
LEFT | RIGHT |