Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 380257 | Differences between
and this patch

Collapse All | Expand All

(-)src/database.cc (-6 / +4 lines)
Lines 3425-3433 database::encrypt_rsa(key_id const & pub Link Here
3425
  rsa_pub_key pub;
3425
  rsa_pub_key pub;
3426
  get_key(pub_id, pub);
3426
  get_key(pub_id, pub);
3427
3427
3428
  SecureVector<Botan::byte> pub_block;
3428
  SecureVector<Botan::byte> pub_block
3429
  pub_block.set(reinterpret_cast<Botan::byte const *>(pub().data()),
3429
    (reinterpret_cast<Botan::byte const *>(pub().data()), pub().size());
3430
                pub().size());
3431
3430
3432
  shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
3431
  shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
3433
  shared_ptr<RSA_PublicKey> pub_key
3432
  shared_ptr<RSA_PublicKey> pub_key
Lines 3471-3484 database::check_signature(key_id const & Link Here
3471
  else
3470
  else
3472
    {
3471
    {
3473
      rsa_pub_key pub;
3472
      rsa_pub_key pub;
3474
      SecureVector<Botan::byte> pub_block;
3475
3473
3476
      if (!public_key_exists(id))
3474
      if (!public_key_exists(id))
3477
        return cert_unknown;
3475
        return cert_unknown;
3478
3476
3479
      get_key(id, pub);
3477
      get_key(id, pub);
3480
      pub_block.set(reinterpret_cast<Botan::byte const *>(pub().data()),
3478
      SecureVector<Botan::byte> pub_block
3481
                    pub().size());
3479
        (reinterpret_cast<Botan::byte const *>(pub().data()), pub().size());
3482
3480
3483
      L(FL("building verifier for %d-byte pub key") % pub_block.size());
3481
      L(FL("building verifier for %d-byte pub key") % pub_block.size());
3484
      shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
3482
      shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
(-)src/gzip.cc (-4 / +19 lines)
Lines 137-143 void Gzip_Compression::start_msg() Link Here
137
/*************************************************
137
/*************************************************
138
* Compress Input with Gzip                       *
138
* Compress Input with Gzip                       *
139
*************************************************/
139
*************************************************/
140
void Gzip_Compression::write(const byte input[], u32bit length)
140
void Gzip_Compression::write(const byte input[], filter_length_t length)
141
   {
141
   {
142
142
143
   count += length;
143
   count += length;
Lines 267-273 void Gzip_Decompression::start_msg() Link Here
267
/*************************************************
267
/*************************************************
268
* Decompress Input with Gzip                     *
268
* Decompress Input with Gzip                     *
269
*************************************************/
269
*************************************************/
270
void Gzip_Decompression::write(const byte input[], u32bit length)
270
void Gzip_Decompression::write(const byte input[], filter_length_t length)
271
   {
271
   {
272
   if(length) no_writes = false;
272
   if(length) no_writes = false;
273
273
Lines 284-291 void Gzip_Decompression::write(const byt Link Here
284
   // Check the gzip header
284
   // Check the gzip header
285
   if (pos < sizeof(GZIP::GZIP_HEADER))
285
   if (pos < sizeof(GZIP::GZIP_HEADER))
286
      {
286
      {
287
      u32bit len = std::min((u32bit)sizeof(GZIP::GZIP_HEADER)-pos, length);
287
      filter_length_t len = std::min((filter_length_t)sizeof(GZIP::GZIP_HEADER)-pos, length);
288
      u32bit cmplen = len;
288
      filter_length_t cmplen = len;
289
      // The last byte is the OS flag - we don't care about that
289
      // The last byte is the OS flag - we don't care about that
290
      if (pos + len - 1 >= GZIP::HEADER_POS_OS)
290
      if (pos + len - 1 >= GZIP::HEADER_POS_OS)
291
         cmplen--;
291
         cmplen--;
Lines 346-353 u32bit Gzip_Decompression::eat_footer(co Link Here
346
      if (footer.size() >= GZIP::FOOTER_LENGTH)
346
      if (footer.size() >= GZIP::FOOTER_LENGTH)
347
         throw Decoding_Error("Gzip_Decompression: Data integrity error in footer");
347
         throw Decoding_Error("Gzip_Decompression: Data integrity error in footer");
348
348
349
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
350
      size_t eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(),
351
                                static_cast<size_t>(length));
352
      footer += std::make_pair(input, eat_len);
353
#else
349
      u32bit eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), length);
354
      u32bit eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), length);
350
      footer.append(input, eat_len);
355
      footer.append(input, eat_len);
356
#endif
351
357
352
      if (footer.size() == GZIP::FOOTER_LENGTH)
358
      if (footer.size() == GZIP::FOOTER_LENGTH)
353
         {
359
         {
Lines 377-383 void Gzip_Decompression::check_footer() Link Here
377
  for (int i = 0; i < 4; i++)
383
  for (int i = 0; i < 4; i++)
378
     buf[3-i] = tmpbuf[i];
384
     buf[3-i] = tmpbuf[i];
379
385
386
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
387
  tmpbuf.resize(4);
388
  tmpbuf.copy(footer.begin(), 4);
389
#else
380
  tmpbuf.set(footer.begin(), 4);
390
  tmpbuf.set(footer.begin(), 4);
391
#endif
381
  if (buf != tmpbuf)
392
  if (buf != tmpbuf)
382
      throw Decoding_Error("Gzip_Decompression: Data integrity error - CRC32 error");
393
      throw Decoding_Error("Gzip_Decompression: Data integrity error - CRC32 error");
383
394
Lines 412-418 void Gzip_Decompression::clear() Link Here
412
   no_writes = true;
423
   no_writes = true;
413
   inflateReset(&(zlib->stream));
424
   inflateReset(&(zlib->stream));
414
425
426
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
427
   footer.clear();
428
#else
415
   footer.destroy();
429
   footer.destroy();
430
#endif
416
   pos = 0;
431
   pos = 0;
417
   datacount = 0;
432
   datacount = 0;
418
   }
433
   }
(-)src/gzip.hh (-2 / +9 lines)
Lines 7-12 Link Here
7
#ifndef BOTAN_EXT_GZIP_H__
7
#ifndef BOTAN_EXT_GZIP_H__
8
#define BOTAN_EXT_GZIP_H__
8
#define BOTAN_EXT_GZIP_H__
9
9
10
#include <botan/version.h>
10
#include <botan/filter.h>
11
#include <botan/filter.h>
11
#include <botan/pipe.h>
12
#include <botan/pipe.h>
12
13
Lines 30-42 namespace GZIP { Link Here
30
31
31
}
32
}
32
33
34
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
35
   typedef size_t filter_length_t;
36
#else
37
   typedef u32bit filter_length_t;
38
#endif
39
33
/*************************************************
40
/*************************************************
34
* Gzip Compression Filter                        *
41
* Gzip Compression Filter                        *
35
*************************************************/
42
*************************************************/
36
class Gzip_Compression : public Filter
43
class Gzip_Compression : public Filter
37
   {
44
   {
38
   public:
45
   public:
39
      void write(const byte input[], u32bit length);
46
      void write(const byte input[], filter_length_t length);
40
      void start_msg();
47
      void start_msg();
41
      void end_msg();
48
      void end_msg();
42
      std::string name() const { return "Gzip_Compression"; }
49
      std::string name() const { return "Gzip_Compression"; }
Lines 60-66 class Gzip_Decompression : public Filter Link Here
60
class Gzip_Decompression : public Filter
67
class Gzip_Decompression : public Filter
61
   {
68
   {
62
   public:
69
   public:
63
      void write(const byte input[], u32bit length);
70
      void write(const byte input[], filter_length_t length);
64
      void start_msg();
71
      void start_msg();
65
      void end_msg();
72
      void end_msg();
66
      std::string name() const { return "Gzip_Decompression"; }
73
      std::string name() const { return "Gzip_Decompression"; }
(-)src/key_packet.cc (-2 / +2 lines)
Lines 106-113 namespace Link Here
106
    void validate_public_key_data(string const & name, string const & keydata) const
106
    void validate_public_key_data(string const & name, string const & keydata) const
107
    {
107
    {
108
      string decoded = decode_base64_as<string>(keydata, origin::user);
108
      string decoded = decode_base64_as<string>(keydata, origin::user);
109
      Botan::SecureVector<Botan::byte> key_block;
109
      Botan::SecureVector<Botan::byte> key_block
110
      key_block.set(reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
110
        (reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
111
      try
111
      try
112
        {
112
        {
113
          Botan::X509::load_key(key_block);
113
          Botan::X509::load_key(key_block);
(-)src/key_store.cc (-4 / +16 lines)
Lines 572-584 key_store_state::decrypt_private_key(key Link Here
572
  try // with empty passphrase
572
  try // with empty passphrase
573
    {
573
    {
574
      Botan::DataSource_Memory ds(kp.priv());
574
      Botan::DataSource_Memory ds(kp.priv());
575
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
575
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
576
      pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI()));
577
#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
576
      pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), ""));
578
      pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), ""));
577
#else
579
#else
578
      pkcs8_key.reset(Botan::PKCS8::load_key(ds, ""));
580
      pkcs8_key.reset(Botan::PKCS8::load_key(ds, ""));
579
#endif
581
#endif
580
    }
582
    }
583
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
584
  catch (Passphrase_Required & e)
585
#else
581
  catch (Botan::Exception & e)
586
  catch (Botan::Exception & e)
587
#endif
582
    {
588
    {
583
      L(FL("failed to load key with no passphrase: %s") % e.what());
589
      L(FL("failed to load key with no passphrase: %s") % e.what());
584
590
Lines 856-864 key_store::make_signature(database & db, Link Here
856
    {
862
    {
857
      if (agent.connected()) {
863
      if (agent.connected()) {
858
        //grab the monotone public key as an RSA_PublicKey
864
        //grab the monotone public key as an RSA_PublicKey
859
        SecureVector<Botan::byte> pub_block;
865
        SecureVector<Botan::byte> pub_block
860
        pub_block.set(reinterpret_cast<Botan::byte const *>(key.pub().data()),
866
          (reinterpret_cast<Botan::byte const *>(key.pub().data()),
861
                      key.pub().size());
867
           key.pub().size());
862
        L(FL("make_signature: building %d-byte pub key") % pub_block.size());
868
        L(FL("make_signature: building %d-byte pub key") % pub_block.size());
863
        shared_ptr<X509_PublicKey> x509_key =
869
        shared_ptr<X509_PublicKey> x509_key =
864
          shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
870
          shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
Lines 1031-1038 key_store_state::migrate_old_key_pair Link Here
1031
  for (;;)
1037
  for (;;)
1032
    try
1038
    try
1033
      {
1039
      {
1040
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
1041
        arc4_key.resize(phrase().size());
1042
        arc4_key.copy(reinterpret_cast<Botan::byte const *>(phrase().data()),
1043
                      phrase().size());
1044
#else
1034
        arc4_key.set(reinterpret_cast<Botan::byte const *>(phrase().data()),
1045
        arc4_key.set(reinterpret_cast<Botan::byte const *>(phrase().data()),
1035
                     phrase().size());
1046
                     phrase().size());
1047
#endif
1036
1048
1037
        Pipe arc4_decryptor(get_cipher("ARC4", arc4_key, Botan::DECRYPTION));
1049
        Pipe arc4_decryptor(get_cipher("ARC4", arc4_key, Botan::DECRYPTION));
1038
1050
(-)src/monotone.cc (-1 / +6 lines)
Lines 170-180 cpp_main(int argc, char ** argv) Link Here
170
      // versions, including all of the stable branch 1.8.x.
170
      // versions, including all of the stable branch 1.8.x.
171
      E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system,
171
      E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system,
172
        F("this monotone binary does not work with Botan 1.9.x"));
172
        F("this monotone binary does not work with Botan 1.9.x"));
173
#else
173
#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11)
174
      E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,22), origin::system,
174
      E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,22), origin::system,
175
        F("this monotone binary requires Botan 1.7.22 or newer"));
175
        F("this monotone binary requires Botan 1.7.22 or newer"));
176
      E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system,
176
      E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system,
177
        F("this monotone binary does not work with Botan 1.9.x"));
177
        F("this monotone binary does not work with Botan 1.9.x"));
178
#else
179
      E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,9,11), origin::system,
180
        F("this monotone binary requires Botan 1.9.11 or newer"));
181
      E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,11,0), origin::system,
182
        F("this monotone binary does not work with Botan 1.11.x"));
178
#endif
183
#endif
179
184
180
      app_state app;
185
      app_state app;
(-)src/packet.cc (-4 / +16 lines)
Lines 156-163 namespace Link Here
156
    void validate_public_key_data(string const & name, string const & keydata) const
156
    void validate_public_key_data(string const & name, string const & keydata) const
157
    {
157
    {
158
      string decoded = decode_base64_as<string>(keydata, origin::user);
158
      string decoded = decode_base64_as<string>(keydata, origin::user);
159
      Botan::SecureVector<Botan::byte> key_block;
159
      Botan::SecureVector<Botan::byte> key_block
160
      key_block.set(reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
160
        (reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
161
      try
161
      try
162
        {
162
        {
163
          Botan::X509::load_key(key_block);
163
          Botan::X509::load_key(key_block);
Lines 175-181 namespace Link Here
175
      Botan::DataSource_Memory ds(decoded);
175
      Botan::DataSource_Memory ds(decoded);
176
      try
176
      try
177
        {
177
        {
178
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
178
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
179
          Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI());
180
#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
179
          Botan::PKCS8::load_key(ds, lazy_rng::get(), string());
181
          Botan::PKCS8::load_key(ds, lazy_rng::get(), string());
180
#else
182
#else
181
          Botan::PKCS8::load_key(ds, string());
183
          Botan::PKCS8::load_key(ds, string());
Lines 189-195 namespace Link Here
189
        }
191
        }
190
      // since we do not want to prompt for a password to decode it finally,
192
      // since we do not want to prompt for a password to decode it finally,
191
      // we ignore all other exceptions
193
      // we ignore all other exceptions
194
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
195
      catch (Passphrase_Required) {}
196
#else
192
      catch (Botan::Invalid_Argument) {}
197
      catch (Botan::Invalid_Argument) {}
198
#endif
193
    }
199
    }
194
    void validate_certname(string const & cn) const
200
    void validate_certname(string const & cn) const
195
    {
201
    {
Lines 460-467 read_packets(istream & in, packet_consum Link Here
460
  return count;
466
  return count;
461
}
467
}
462
468
469
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
470
std::string Dummy_UI::get_passphrase(const std::string&,
471
                                     const std::string&,
472
                                     Botan::User_Interface::UI_Result&) const {
473
  throw Passphrase_Required();
474
}
475
#endif
463
476
464
465
// Local Variables:
477
// Local Variables:
466
// mode: C++
478
// mode: C++
467
// fill-column: 76
479
// fill-column: 76
(-)src/packet.hh (+18 lines)
Lines 84-91 size_t read_packets(std::istream & in, p Link Here
84
84
85
size_t read_packets(std::istream & in, packet_consumer & cons);
85
size_t read_packets(std::istream & in, packet_consumer & cons);
86
86
87
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
88
// work around botan commit 2d09d7d0cd4bd0e7155d001dd65a4f29103b158c
89
#include <botan/ui.h>
90
class Dummy_UI : public Botan::User_Interface
91
{
92
public:
93
  virtual std::string get_passphrase(const std::string&,
94
                                     const std::string&,
95
                                     Botan::User_Interface::UI_Result&) const;
96
};
97
class Passphrase_Required : public Botan::Exception {
98
public:
99
  Passphrase_Required(const std::string& m = "Passphrase required") :
100
    Botan::Exception(m)
101
    {}
102
};
87
#endif
103
#endif
88
104
105
#endif
106
89
// Local Variables:
107
// Local Variables:
90
// mode: C++
108
// mode: C++
91
// fill-column: 76
109
// fill-column: 76
(-)src/sha1.cc (-1 / +4 lines)
Lines 50-58 CMD_HIDDEN(benchmark_sha1, "benchmark_sh Link Here
50
  Botan::Default_Benchmark_Timer timer;
50
  Botan::Default_Benchmark_Timer timer;
51
  std::map<std::string, double> results =
51
  std::map<std::string, double> results =
52
    Botan::algorithm_benchmark("SHA-1",  milliseconds, timer, rng, af);
52
    Botan::algorithm_benchmark("SHA-1",  milliseconds, timer, rng, af);
53
#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11)
54
  std::map<std::string, double> results =
55
    Botan::algorithm_benchmark("SHA-1",  milliseconds, rng, af);
53
#else
56
#else
54
  std::map<std::string, double> results =
57
  std::map<std::string, double> results =
55
    Botan::algorithm_benchmark("SHA-1",  milliseconds, rng, af);
58
    Botan::algorithm_benchmark("SHA-1",  af, rng, milliseconds, 16);
56
#endif
59
#endif
57
60
58
  for(std::map<std::string, double>::const_iterator i = results.begin();
61
  for(std::map<std::string, double>::const_iterator i = results.begin();
(-)src/ssh_agent.cc (-3 / +3 lines)
Lines 385-393 ssh_agent::has_key(const keypair & key) Link Here
385
ssh_agent::has_key(const keypair & key)
385
ssh_agent::has_key(const keypair & key)
386
{
386
{
387
  //grab the monotone public key as an RSA_PublicKey
387
  //grab the monotone public key as an RSA_PublicKey
388
  SecureVector<Botan::byte> pub_block;
388
  SecureVector<Botan::byte> pub_block
389
  pub_block.set(reinterpret_cast<Botan::byte const *>((key.pub)().data()),
389
    (reinterpret_cast<Botan::byte const *>((key.pub)().data()),
390
                (key.pub)().size());
390
     (key.pub)().size());
391
  L(FL("has_key: building %d-byte pub key") % pub_block.size());
391
  L(FL("has_key: building %d-byte pub key") % pub_block.size());
392
  shared_ptr<X509_PublicKey> x509_key =
392
  shared_ptr<X509_PublicKey> x509_key =
393
    shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
393
    shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
(-)src/transforms.cc (-7 / +7 lines)
Lines 53-62 using Botan::Hash_Filter; Link Here
53
// paradigm "must" be used. this program is intended for source code
53
// paradigm "must" be used. this program is intended for source code
54
// control and I make no bones about it.
54
// control and I make no bones about it.
55
55
56
NORETURN(static inline void error_in_transform(Botan::Exception & e));
56
NORETURN(static inline void error_in_transform(std::exception & e));
57
57
58
static inline void
58
static inline void
59
error_in_transform(Botan::Exception & e, origin::type caused_by)
59
error_in_transform(std::exception & e, origin::type caused_by)
60
{
60
{
61
  // these classes can all indicate data corruption
61
  // these classes can all indicate data corruption
62
  if (typeid(e) == typeid(Botan::Encoding_Error)
62
  if (typeid(e) == typeid(Botan::Encoding_Error)
Lines 107-113 error_in_transform(Botan::Exception & e, Link Here
107
        pipe->process_msg(in);                                  \
107
        pipe->process_msg(in);                                  \
108
        out = pipe->read_all_as_string(Pipe::LAST_MESSAGE);     \
108
        out = pipe->read_all_as_string(Pipe::LAST_MESSAGE);     \
109
      }                                                         \
109
      }                                                         \
110
    catch (Botan::Exception & e)                                \
110
    catch (std::exception & e)                                   \
111
      {                                                         \
111
      {                                                         \
112
        pipe.reset(new Pipe(new T(carg)));                      \
112
        pipe.reset(new Pipe(new T(carg)));                      \
113
        error_in_transform(e, made_from);                       \
113
        error_in_transform(e, made_from);                       \
Lines 173-179 template<> string xform<Botan::Hex_Decod Link Here
173
            {
173
            {
174
              throw Botan::Decoding_Error(string("invalid hex character '") + (char)c + "'");
174
              throw Botan::Decoding_Error(string("invalid hex character '") + (char)c + "'");
175
            }
175
            }
176
          catch(Botan::Exception & e)
176
          catch(std::exception & e)
177
            {
177
            {
178
              error_in_transform(e, made_from);
178
              error_in_transform(e, made_from);
179
            }
179
            }
Lines 219-225 void pack(T const & in, base64< gzip<T> Link Here
219
      tmp = pipe->read_all_as_string(Pipe::LAST_MESSAGE);
219
      tmp = pipe->read_all_as_string(Pipe::LAST_MESSAGE);
220
      out = base64< gzip<T> >(tmp, in.made_from);
220
      out = base64< gzip<T> >(tmp, in.made_from);
221
    }
221
    }
222
  catch (Botan::Exception & e)
222
  catch (std::exception & e)
223
    {
223
    {
224
      pipe.reset(new Pipe(new Gzip_Compression,
224
      pipe.reset(new Pipe(new Gzip_Compression,
225
                          new Base64_Encoder));
225
                          new Base64_Encoder));
Lines 237-243 void unpack(base64< gzip<T> > const & in Link Here
237
      pipe->process_msg(in());
237
      pipe->process_msg(in());
238
      out = T(pipe->read_all_as_string(Pipe::LAST_MESSAGE), in.made_from);
238
      out = T(pipe->read_all_as_string(Pipe::LAST_MESSAGE), in.made_from);
239
    }
239
    }
240
  catch (Botan::Exception & e)
240
  catch (std::exception & e)
241
    {
241
    {
242
      pipe.reset(new Pipe(new Base64_Decoder,
242
      pipe.reset(new Pipe(new Base64_Decoder,
243
                          new Gzip_Decompression));
243
                          new Gzip_Decompression));
Lines 264-270 calculate_ident(data const & dat, Link Here
264
      p->process_msg(dat());
264
      p->process_msg(dat());
265
      ident = id(p->read_all_as_string(Pipe::LAST_MESSAGE), dat.made_from);
265
      ident = id(p->read_all_as_string(Pipe::LAST_MESSAGE), dat.made_from);
266
    }
266
    }
267
  catch (Botan::Exception & e)
267
  catch (std::exception & e)
268
    {
268
    {
269
      p.reset(new Pipe(new Hash_Filter("SHA-160")));
269
      p.reset(new Pipe(new Hash_Filter("SHA-160")));
270
      error_in_transform(e, dat.made_from);
270
      error_in_transform(e, dat.made_from);

Return to bug 380257