diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-07-12 08:50:45 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-07-12 08:50:45 +0000 |
commit | 296f990f1d5309436a6033f1120e0b5b2d698bf3 (patch) | |
tree | 368f5858a9da9e589ed2dfd5141f122d2293369d | |
parent | 15b4d21a45db18ce0384d1c42c83459ba2ed24f8 (diff) | |
download | gnunet-296f990f1d5309436a6033f1120e0b5b2d698bf3.tar.gz gnunet-296f990f1d5309436a6033f1120e0b5b2d698bf3.zip |
verified and improved address checking for external hostname and verify option
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 347419bf6..56cd12fe8 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -658,17 +658,17 @@ http_server_plugin_address_suggested (void *cls, const void *addr, | |||
658 | struct HttpAddressWrapper *next; | 658 | struct HttpAddressWrapper *next; |
659 | struct HttpAddressWrapper *pos; | 659 | struct HttpAddressWrapper *pos; |
660 | struct HttpAddress *h_addr; | 660 | struct HttpAddress *h_addr; |
661 | GNUNET_break (0); | ||
662 | h_addr = (struct HttpAddress *) addr; | 661 | h_addr = (struct HttpAddress *) addr; |
662 | |||
663 | if ((NULL != plugin->ext_addr) && | 663 | if ((NULL != plugin->ext_addr) && |
664 | GNUNET_YES == (http_common_cmp_addresses (addr, addrlen, | 664 | GNUNET_YES == (http_common_cmp_addresses (addr, addrlen, |
665 | plugin->ext_addr, plugin->ext_addr_len))) | 665 | plugin->ext_addr, plugin->ext_addr_len))) |
666 | { | 666 | { |
667 | if ((ntohl(h_addr->options) & HTTP_OPTIONS_VERIFY_CERTIFICATE) != HTTP_OPTIONS_VERIFY_CERTIFICATE) | 667 | /* Checking HTTP_OPTIONS_VERIFY_CERTIFICATE option for external hostname */ |
668 | GNUNET_break (0); | 668 | if ((ntohl(h_addr->options) & HTTP_OPTIONS_VERIFY_CERTIFICATE) != |
669 | else | 669 | (plugin->options & HTTP_OPTIONS_VERIFY_CERTIFICATE)) |
670 | GNUNET_break (0); | 670 | return GNUNET_NO; /* VERIFY option not set as required! */ |
671 | return GNUNET_OK; | 671 | return GNUNET_OK; |
672 | } | 672 | } |
673 | 673 | ||
674 | next = plugin->addr_head; | 674 | next = plugin->addr_head; |