~ubuntu-branches/debian/sid/filezilla/sid

« back to all changes in this revision

Viewing changes to src/engine/notification.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adrien Cunin
  • Date: 2009-08-20 00:38:30 UTC
  • mfrom: (1.3.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090820003830-0prw6uzkgv06kbkh
* New upstream release (LP: #389525)
   - New feature: remote file search
   - pkg-config is now used to search for gnutls (Closes: #529822)
* Changed package descriptions, not mentioning Windows anymore
* Updated features list in package description
* Added pkg-config to the build-dependencies
* Build-Depend on libgnutls-dev version >= 2.8.3, as required by upstream
* Updated Standards-Version to 3.8.3
* debian/rules: touch magic on configure and configure.in to make sure the
  first has a more recent timestamp than the second (Closes: #529701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
        return pData;
185
185
}
186
186
 
187
 
CCertificateNotification::CCertificateNotification(const wxString& host, unsigned int port,
 
187
CCertificate::CCertificate(
188
188
                const unsigned char* rawData, unsigned int len,
189
189
                wxDateTime activationTime, wxDateTime expirationTime,
190
190
                const wxString& serial,
192
192
                const wxString& fingerprint_md5,
193
193
                const wxString& fingerprint_sha1,
194
194
                const wxString& subject,
195
 
                const wxString& issuer,
196
 
                const wxString& sessionCipher,
197
 
                const wxString& sessionMac)
 
195
                const wxString& issuer)
198
196
{
199
 
        m_host = host;
200
 
        m_port = port;
201
 
 
202
197
        wxASSERT(len);
203
198
        if (len)
204
199
        {
221
216
 
222
217
        m_subject = subject;
223
218
        m_issuer = issuer;
 
219
}
 
220
 
 
221
CCertificate::CCertificate(const CCertificate &op)
 
222
{
 
223
        if (op.m_rawData)
 
224
        {
 
225
                wxASSERT(op.m_len);
 
226
                if (op.m_len)
 
227
                {
 
228
                        m_rawData = new unsigned char[op.m_len];
 
229
                        memcpy(m_rawData, op.m_rawData, op.m_len);
 
230
                }
 
231
                else
 
232
                        m_rawData = 0;
 
233
        }
 
234
        else
 
235
                m_rawData = 0;
 
236
        m_len = op.m_len;
 
237
 
 
238
        m_activationTime = op.m_activationTime;
 
239
        m_expirationTime = op.m_expirationTime;
 
240
 
 
241
        m_serial = op.m_serial;
 
242
        m_pkalgoname = op.m_pkalgoname;
 
243
        m_pkalgobits = op.m_pkalgobits;
 
244
 
 
245
        m_fingerprint_md5 = op.m_fingerprint_md5;
 
246
        m_fingerprint_sha1 = op.m_fingerprint_sha1;
 
247
 
 
248
        m_subject = op.m_subject;
 
249
        m_issuer = op.m_issuer;
 
250
}
 
251
 
 
252
CCertificate::~CCertificate()
 
253
{
 
254
        delete [] m_rawData;
 
255
}
 
256
 
 
257
CCertificate& CCertificate::operator=(const CCertificate &op)
 
258
{
 
259
        if (&op == this)
 
260
                return *this;
 
261
 
 
262
        delete [] m_rawData;
 
263
        if (op.m_rawData)
 
264
        {
 
265
                wxASSERT(op.m_len);
 
266
                if (op.m_len)
 
267
                {
 
268
                        m_rawData = new unsigned char[op.m_len];
 
269
                        memcpy(m_rawData, op.m_rawData, op.m_len);
 
270
                }
 
271
                else
 
272
                        m_rawData = 0;
 
273
        }
 
274
        else
 
275
                m_rawData = 0;
 
276
        m_len = op.m_len;
 
277
 
 
278
        m_activationTime = op.m_activationTime;
 
279
        m_expirationTime = op.m_expirationTime;
 
280
 
 
281
        m_serial = op.m_serial;
 
282
        m_pkalgoname = op.m_pkalgoname;
 
283
        m_pkalgobits = op.m_pkalgobits;
 
284
 
 
285
        m_fingerprint_md5 = op.m_fingerprint_md5;
 
286
        m_fingerprint_sha1 = op.m_fingerprint_sha1;
 
287
 
 
288
        m_subject = op.m_subject;
 
289
        m_issuer = op.m_issuer;
 
290
 
 
291
        return *this;
 
292
}
 
293
 
 
294
CCertificateNotification::CCertificateNotification(const wxString& host, unsigned int port,
 
295
                const wxString& sessionCipher,
 
296
                const wxString& sessionMac,
 
297
                const std::vector<CCertificate> &certificates)
 
298
{
 
299
        m_host = host;
 
300
        m_port = port;
224
301
 
225
302
        m_sessionCipher = sessionCipher;
226
303
        m_sessionMac = sessionMac;
227
304
 
 
305
        m_certificates = certificates;
 
306
 
228
307
        m_trusted = false;
229
308
}
230
309
 
231
310
CCertificateNotification::~CCertificateNotification()
232
311
{
233
 
        delete [] m_rawData;
234
 
}
235
 
 
236
 
CCertificateNotification::CCertificateNotification(const CCertificateNotification& ref)
237
 
{
238
 
        m_host = ref.m_host;
239
 
        m_port = ref.m_port;
240
 
 
241
 
        if (ref.m_rawData)
242
 
        {
243
 
                wxASSERT(ref.m_len);
244
 
                if (ref.m_len)
245
 
                {
246
 
                        m_rawData = new unsigned char[ref.m_len];
247
 
                        memcpy(m_rawData, ref.m_rawData, ref.m_len);
248
 
                }
249
 
                else
250
 
                        m_rawData = 0;
251
 
        }
252
 
        else
253
 
                m_rawData = 0;
254
 
        m_len = ref.m_len;
255
 
 
256
 
        m_activationTime = ref.m_activationTime;
257
 
        m_expirationTime = ref.m_expirationTime;
258
 
 
259
 
        m_serial = ref.m_serial;
260
 
        m_pkalgoname = ref.m_pkalgoname;
261
 
        m_pkalgobits = ref.m_pkalgobits;
262
 
 
263
 
        m_fingerprint_md5 = ref.m_fingerprint_md5;
264
 
        m_fingerprint_sha1 = ref.m_fingerprint_sha1;
265
 
 
266
 
        m_subject = ref.m_subject;
267
 
        m_issuer = ref.m_issuer;
268
 
 
269
 
        m_sessionCipher = ref.m_sessionCipher;
270
 
        m_sessionMac = ref.m_sessionMac;
271
 
 
272
 
        m_trusted = ref.m_trusted;
273
 
}
274
 
 
275
 
CCertificateNotification& CCertificateNotification::operator=(const CCertificateNotification &op)
276
 
{
277
 
        if (&op == this)
278
 
                return *this;
279
 
 
280
 
        m_host = op.m_host;
281
 
        m_port = op.m_port;
282
 
 
283
 
        delete [] m_rawData;
284
 
        if (op.m_rawData)
285
 
        {
286
 
                wxASSERT(op.m_len);
287
 
                if (op.m_len)
288
 
                {
289
 
                        m_rawData = new unsigned char[op.m_len];
290
 
                        memcpy(m_rawData, op.m_rawData, op.m_len);
291
 
                }
292
 
                else
293
 
                        m_rawData = 0;
294
 
        }
295
 
        else
296
 
                m_rawData = 0;
297
 
        m_len = op.m_len;
298
 
 
299
 
        m_activationTime = op.m_activationTime;
300
 
        m_expirationTime = op.m_expirationTime;
301
 
 
302
 
        m_serial = op.m_serial;
303
 
        m_pkalgoname = op.m_pkalgoname;
304
 
        m_pkalgobits = op.m_pkalgobits;
305
 
 
306
 
        m_fingerprint_md5 = op.m_fingerprint_md5;
307
 
        m_fingerprint_sha1 = op.m_fingerprint_sha1;
308
 
 
309
 
        m_subject = op.m_subject;
310
 
        m_issuer = op.m_issuer;
311
 
 
312
 
        m_sessionCipher = op.m_sessionCipher;
313
 
        m_sessionMac = op.m_sessionMac;
314
 
 
315
 
        m_trusted = op.m_trusted;
316
 
 
317
 
        return *this;
318
312
}