1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

merge from 2.0

This commit is contained in:
winlin 2016-09-05 09:39:20 +08:00
commit 815f2491a4
3 changed files with 11 additions and 2 deletions

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR 3 #define VERSION_MAJOR 3
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 212 #define VERSION_REVISION 213
// generated by configure, only macros. // generated by configure, only macros.
#include <srs_auto_headers.hpp> #include <srs_auto_headers.hpp>

View file

@ -151,6 +151,11 @@ namespace _srs_internal
} }
SrsDH::~SrsDH() SrsDH::~SrsDH()
{
close();
}
void SrsDH::close()
{ {
if (pdh != NULL) { if (pdh != NULL) {
if (pdh->p != NULL) { if (pdh->p != NULL) {
@ -251,6 +256,8 @@ namespace _srs_internal
int32_t bits_count = 1024; int32_t bits_count = 1024;
close();
//1. Create the DH //1. Create the DH
if ((pdh = DH_new()) == NULL) { if ((pdh = DH_new()) == NULL) {
ret = ERROR_OpenSslCreateDH; ret = ERROR_OpenSslCreateDH;

View file

@ -59,6 +59,8 @@ namespace _srs_internal
public: public:
SrsDH(); SrsDH();
virtual ~SrsDH(); virtual ~SrsDH();
private:
virtual void close();
public: public:
/** /**
* initialize dh, generate the public and private key. * initialize dh, generate the public and private key.