Fix Windows Compilation:

pqi/authssl.cc: In member function 'virtual X509*
AuthSSLimpl::SignX509ReqWithGPG(X509_REQ*, long int)':
pqi/authssl.cc:929:3: error: jump to label 'err' [-fpermissive]
   err:
   ^
pqi/authssl.cc:872:22: error:   from here [-fpermissive]
                 goto err;
                      ^
pqi/authssl.cc:877:24: error:   crosses initialization of 'unsigned
char* p'
         unsigned char *p=buf_in;
                        ^
pqi/authssl.cc: In member function 'virtual bool
AuthSSLimpl::AuthX509WithGPG(X509*, uint32_t&)':
pqi/authssl.cc:1091:1: error: jump to label 'err' [-fpermissive]
 err:
 ^
pqi/authssl.cc:1027:8: error:   from here [-fpermissive]
   goto err;
        ^
pqi/authssl.cc:1035:17: error:   crosses initialization of 'unsigned
char* p'
  unsigned char *p=buf_in;
                 ^
This commit is contained in:
Phenom 2017-05-08 13:01:34 +02:00
parent 5022ef00d4
commit 4a2f688f14

View File

@ -854,6 +854,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/)
#if OPENSSL_VERSION_NUMBER < 0x10100000L
inl=i2d(data,NULL);
buf_in=(unsigned char *)OPENSSL_malloc((unsigned int)inl);
unsigned char *p=NULL;
#else
inl=i2d_re_X509_tbs(x509,&buf_in) ; // this does the i2d over x509->cert_info
#endif
@ -874,7 +875,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/)
std::cerr << "Buffers Allocated" << std::endl;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
unsigned char *p=buf_in;
p=buf_in;
i2d(data,&p);
#endif
@ -1002,6 +1003,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic)
#if OPENSSL_VERSION_NUMBER < 0x10100000L
inl=i2d(data,NULL);
buf_in=(unsigned char *)OPENSSL_malloc((unsigned int)inl);
unsigned char *p=NULL;
#else
inl=i2d_re_X509_tbs(x509,&buf_in) ; // this does the i2d over x509->cert_info
#endif
@ -1032,7 +1034,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic)
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
unsigned char *p=buf_in;
p=buf_in;
i2d(data,&p);
#endif
/* data in buf_in, ready to be hashed */