1 |
|
/* ============================================================================ |
2 |
|
* Douglas Thrift's Search Engine License |
3 |
|
* |
4 |
< |
* Copyright (C) 2002-2003, Douglas Thrift. All Rights Reserved. |
4 |
> |
* Copyright (C) 2002-2004, Douglas Thrift. All Rights Reserved. |
5 |
|
* Redistribution and use in source and binary forms, with or without |
6 |
|
* modification, are permitted provided that the following conditions are met: |
7 |
|
* |
46 |
|
// |
47 |
|
// Douglas Thrift |
48 |
|
// |
49 |
< |
// $Id: HttpHandler.cpp,v 1.24 2003/07/20 04:07:54 douglas Exp $ |
49 |
> |
// $Id$ |
50 |
|
|
51 |
|
#include "HttpHandler.h" |
52 |
|
|
283 |
|
|
284 |
|
void HttpHandler::clear() |
285 |
|
{ |
286 |
+ |
#ifdef _OpenSSL_ |
287 |
|
if (tls) |
288 |
|
{ |
289 |
|
SSL_shutdown(ssl); |
290 |
|
SSL_free(ssl); |
291 |
|
SSL_CTX_free(ctx); |
292 |
|
} |
293 |
+ |
#endif |
294 |
|
|
295 |
|
closesocket(http); |
296 |
|
|
804 |
|
RAND_seed(junk, seed % 30 + 2); |
805 |
|
|
806 |
|
delete junk; |
807 |
+ |
#else |
808 |
+ |
if (debug) cerr << "junk = /dev/urandom\n"; |
809 |
|
#endif |
810 |
|
|
811 |
|
ctx = SSL_CTX_new(TLSv1_client_method()); |