mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 12:24:24 -04:00
fixed compilation with openssl1.0.1 broken by previous commits
This commit is contained in:
parent
4dac3b4f14
commit
8c3f553579
1 changed files with 4 additions and 6 deletions
|
@ -814,15 +814,13 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/)
|
||||||
//EVP_PKEY *pkey = NULL;
|
//EVP_PKEY *pkey = NULL;
|
||||||
const EVP_MD *type = EVP_sha1();
|
const EVP_MD *type = EVP_sha1();
|
||||||
|
|
||||||
EVP_MD_CTX *ctx = EVP_MD_CTX_new();
|
EVP_MD_CTX *ctx = EVP_MD_CTX_create();
|
||||||
unsigned char *p,*buf_in=NULL;
|
unsigned char *p,*buf_in=NULL;
|
||||||
unsigned char *buf_hashout=NULL,*buf_sigout=NULL;
|
unsigned char *buf_hashout=NULL,*buf_sigout=NULL;
|
||||||
int inl=0,hashoutl=0;
|
int inl=0,hashoutl=0;
|
||||||
int sigoutl=0;
|
int sigoutl=0;
|
||||||
X509_ALGOR *a;
|
X509_ALGOR *a;
|
||||||
|
|
||||||
EVP_MD_CTX_init(ctx);
|
|
||||||
|
|
||||||
/* FIX ALGORITHMS */
|
/* FIX ALGORITHMS */
|
||||||
|
|
||||||
a = const_cast<X509_ALGOR*>(algor1);
|
a = const_cast<X509_ALGOR*>(algor1);
|
||||||
|
@ -923,7 +921,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/)
|
||||||
|
|
||||||
std::cerr << "Certificate Complete" << std::endl;
|
std::cerr << "Certificate Complete" << std::endl;
|
||||||
|
|
||||||
EVP_MD_CTX_free(ctx) ;
|
EVP_MD_CTX_destroy(ctx) ;
|
||||||
|
|
||||||
return x509;
|
return x509;
|
||||||
|
|
||||||
|
@ -994,7 +992,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic)
|
||||||
|
|
||||||
const EVP_MD *type = EVP_sha1();
|
const EVP_MD *type = EVP_sha1();
|
||||||
|
|
||||||
EVP_MD_CTX *ctx = EVP_MD_CTX_new();
|
EVP_MD_CTX *ctx = EVP_MD_CTX_create();
|
||||||
unsigned char *p,*buf_in=NULL;
|
unsigned char *p,*buf_in=NULL;
|
||||||
unsigned char *buf_hashout=NULL,*buf_sigout=NULL;
|
unsigned char *buf_hashout=NULL,*buf_sigout=NULL;
|
||||||
int inl=0,hashoutl=0;
|
int inl=0,hashoutl=0;
|
||||||
|
@ -1080,7 +1078,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic)
|
||||||
#ifdef AUTHSSL_DEBUG
|
#ifdef AUTHSSL_DEBUG
|
||||||
std::cerr << "AuthSSLimpl::AuthX509() X509 authenticated" << std::endl;
|
std::cerr << "AuthSSLimpl::AuthX509() X509 authenticated" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
EVP_MD_CTX_free(ctx) ;
|
EVP_MD_CTX_destroy(ctx) ;
|
||||||
|
|
||||||
OPENSSL_free(buf_in) ;
|
OPENSSL_free(buf_in) ;
|
||||||
OPENSSL_free(buf_hashout) ;
|
OPENSSL_free(buf_hashout) ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue