diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-17 21:56:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-17 21:56:21 +0000 |
commit | 5bb4b33bf7cc18112ce1770e0012096e7bb9426b (patch) | |
tree | 5c941ed913af03aef6b13018555a05a04ea4f94e /src/fs/fs_search.c | |
parent | bed39036b47e1b820ee40d645f743e18520c4f8c (diff) | |
download | gnunet-5bb4b33bf7cc18112ce1770e0012096e7bb9426b.tar.gz gnunet-5bb4b33bf7cc18112ce1770e0012096e7bb9426b.zip |
fixes
Diffstat (limited to 'src/fs/fs_search.c')
-rw-r--r-- | src/fs/fs_search.c | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 21fd7e8f1..da61cea57 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -574,11 +574,15 @@ process_kblock (struct GNUNET_FS_SearchContext *sc, | |||
574 | } | 574 | } |
575 | /* decrypt */ | 575 | /* decrypt */ |
576 | GNUNET_CRYPTO_hash_to_aes_key (&sc->requests[i].key, &skey, &iv); | 576 | GNUNET_CRYPTO_hash_to_aes_key (&sc->requests[i].key, &skey, &iv); |
577 | GNUNET_CRYPTO_aes_decrypt (&kb[1], | 577 | if (-1 == GNUNET_CRYPTO_aes_decrypt (&kb[1], |
578 | size - sizeof (struct KBlock), | 578 | size - sizeof (struct KBlock), |
579 | &skey, | 579 | &skey, |
580 | &iv, | 580 | &iv, |
581 | pt); | 581 | pt)) |
582 | { | ||
583 | GNUNET_break (0); | ||
584 | return; | ||
585 | } | ||
582 | /* parse */ | 586 | /* parse */ |
583 | eos = memchr (pt, 0, sizeof (pt)); | 587 | eos = memchr (pt, 0, sizeof (pt)); |
584 | if (NULL == eos) | 588 | if (NULL == eos) |
@@ -654,11 +658,15 @@ process_nblock (struct GNUNET_FS_SearchContext *sc, | |||
654 | } | 658 | } |
655 | /* decrypt */ | 659 | /* decrypt */ |
656 | GNUNET_CRYPTO_hash_to_aes_key (&sc->requests[i].key, &skey, &iv); | 660 | GNUNET_CRYPTO_hash_to_aes_key (&sc->requests[i].key, &skey, &iv); |
657 | GNUNET_CRYPTO_aes_decrypt (&nb[1], | 661 | if (-1 == GNUNET_CRYPTO_aes_decrypt (&nb[1], |
658 | size - sizeof (struct NBlock), | 662 | size - sizeof (struct NBlock), |
659 | &skey, | 663 | &skey, |
660 | &iv, | 664 | &iv, |
661 | pt); | 665 | pt)) |
666 | { | ||
667 | GNUNET_break (0); | ||
668 | return; | ||
669 | } | ||
662 | /* parse */ | 670 | /* parse */ |
663 | eos = memchr (pt, 0, sizeof (pt)); | 671 | eos = memchr (pt, 0, sizeof (pt)); |
664 | if (NULL == eos) | 672 | if (NULL == eos) |
@@ -736,11 +744,15 @@ process_sblock (struct GNUNET_FS_SearchContext *sc, | |||
736 | strlen (identifier), | 744 | strlen (identifier), |
737 | &key); | 745 | &key); |
738 | GNUNET_CRYPTO_hash_to_aes_key (&key, &skey, &iv); | 746 | GNUNET_CRYPTO_hash_to_aes_key (&key, &skey, &iv); |
739 | GNUNET_CRYPTO_aes_decrypt (&sb[1], | 747 | if (-1 == GNUNET_CRYPTO_aes_decrypt (&sb[1], |
740 | len, | 748 | len, |
741 | &skey, | 749 | &skey, |
742 | &iv, | 750 | &iv, |
743 | pt); | 751 | pt)) |
752 | { | ||
753 | GNUNET_break (0); | ||
754 | return; | ||
755 | } | ||
744 | /* parse */ | 756 | /* parse */ |
745 | off = GNUNET_STRINGS_buffer_tokenize (pt, | 757 | off = GNUNET_STRINGS_buffer_tokenize (pt, |
746 | len, | 758 | len, |