Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Side by Side Diff: openssl/demos/tunala/tunala.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « openssl/demos/tunala/cb.c ('k') | openssl/doc/apps/asn1parse.pod » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #if defined(NO_BUFFER) || defined(NO_IP) || defined(NO_OPENSSL) 1 #if defined(NO_BUFFER) || defined(NO_IP) || defined(NO_OPENSSL)
2 #error "Badness, NO_BUFFER, NO_IP or NO_OPENSSL is defined, turn them *off*" 2 #error "Badness, NO_BUFFER, NO_IP or NO_OPENSSL is defined, turn them *off*"
3 #endif 3 #endif
4 4
5 /* Include our bits'n'pieces */ 5 /* Include our bits'n'pieces */
6 #include "tunala.h" 6 #include "tunala.h"
7 7
8 8
9 /********************************************/ 9 /********************************************/
10 /* Our local types that specify our "world" */ 10 /* Our local types that specify our "world" */
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 690 }
691 fprintf(stderr, "Info, using 'standard' DH parameters\n" ); 691 fprintf(stderr, "Info, using 'standard' DH parameters\n" );
692 goto do_it; 692 goto do_it;
693 } 693 }
694 if(strcmp(dh_special, "generate") != 0) 694 if(strcmp(dh_special, "generate") != 0)
695 /* This shouldn't happen - screening values is handled 695 /* This shouldn't happen - screening values is handled
696 * in main(). */ 696 * in main(). */
697 abort(); 697 abort();
698 fprintf(stderr, "Info, generating DH parameters ... "); 698 fprintf(stderr, "Info, generating DH parameters ... ");
699 fflush(stderr); 699 fflush(stderr);
700 » » if((dh = DH_generate_parameters(512, DH_GENERATOR_5, 700 » » if(!(dh = DH_new()) || !DH_generate_parameters_ex(dh, 512,
701 » » » » » NULL, NULL)) == NULL) { 701 » » » » » DH_GENERATOR_5, NULL)) {
702 fprintf(stderr, "error!\n"); 702 fprintf(stderr, "error!\n");
703 if(dh)
704 DH_free(dh);
703 return 0; 705 return 0;
704 } 706 }
705 fprintf(stderr, "complete\n"); 707 fprintf(stderr, "complete\n");
706 goto do_it; 708 goto do_it;
707 } 709 }
708 /* So, we're loading dh_file */ 710 /* So, we're loading dh_file */
709 if((fp = fopen(dh_file, "r")) == NULL) { 711 if((fp = fopen(dh_file, "r")) == NULL) {
710 fprintf(stderr, "Error, couldn't open '%s' for DH parameters\n", 712 fprintf(stderr, "Error, couldn't open '%s' for DH parameters\n",
711 dh_file); 713 dh_file);
712 return 0; 714 return 0;
(...skipping 13 matching lines...) Expand all
726 } 728 }
727 729
728 static SSL_CTX *initialise_ssl_ctx(int server_mode, const char *engine_id, 730 static SSL_CTX *initialise_ssl_ctx(int server_mode, const char *engine_id,
729 const char *CAfile, const char *cert, const char *key, 731 const char *CAfile, const char *cert, const char *key,
730 const char *dcert, const char *dkey, const char *cipher_list, 732 const char *dcert, const char *dkey, const char *cipher_list,
731 const char *dh_file, const char *dh_special, int tmp_rsa, 733 const char *dh_file, const char *dh_special, int tmp_rsa,
732 int ctx_options, int out_state, int out_verify, int verify_mode, 734 int ctx_options, int out_state, int out_verify, int verify_mode,
733 unsigned int verify_depth) 735 unsigned int verify_depth)
734 { 736 {
735 SSL_CTX *ctx = NULL, *ret = NULL; 737 SSL_CTX *ctx = NULL, *ret = NULL;
736 » SSL_METHOD *meth; 738 » const SSL_METHOD *meth;
737 ENGINE *e = NULL; 739 ENGINE *e = NULL;
738 740
739 OpenSSL_add_ssl_algorithms(); 741 OpenSSL_add_ssl_algorithms();
740 SSL_load_error_strings(); 742 SSL_load_error_strings();
741 743
742 meth = (server_mode ? SSLv23_server_method() : SSLv23_client_method()); 744 meth = (server_mode ? SSLv23_server_method() : SSLv23_client_method());
743 if(meth == NULL) 745 if(meth == NULL)
744 goto err; 746 goto err;
745 if(engine_id) { 747 if(engine_id) {
746 ENGINE_load_builtin_engines(); 748 ENGINE_load_builtin_engines();
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 if(!state_machine_close_clean(&item->sm)) 1100 if(!state_machine_close_clean(&item->sm))
1099 return 0; 1101 return 0;
1100 } 1102 }
1101 if((item->dirty_read == -1) || (item->dirty_send == -1)) { 1103 if((item->dirty_read == -1) || (item->dirty_send == -1)) {
1102 if(!state_machine_close_dirty(&item->sm)) 1104 if(!state_machine_close_dirty(&item->sm))
1103 return 0; 1105 return 0;
1104 } 1106 }
1105 return 1; 1107 return 1;
1106 } 1108 }
1107 1109
OLDNEW
« no previous file with comments | « openssl/demos/tunala/cb.c ('k') | openssl/doc/apps/asn1parse.pod » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698