some bugs fixed; closes #13
This commit is contained in:
@@ -379,7 +379,8 @@ namespace openssl {
|
||||
" certificate the issuer certificate could not be found: this"
|
||||
" occurs if the issuer certificate of an untrusted certificate"
|
||||
" cannot be found.";
|
||||
case X509_V_ERR_UNABLE_TO_GET_CRL: "X509_V_ERR_UNABLE_TO_GET_CRL:"
|
||||
case X509_V_ERR_UNABLE_TO_GET_CRL:
|
||||
return "X509_V_ERR_UNABLE_TO_GET_CRL:"
|
||||
" unable to get certificate CRL the CRL of a certificate could"
|
||||
" not be found. Unused.";
|
||||
case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE:
|
||||
@@ -865,6 +866,10 @@ namespace openssl {
|
||||
tag and length in the first two char-fields. */
|
||||
unsigned char* c(0);
|
||||
int len(i2d_X509(_x509, &c));
|
||||
if (len<15 || len<15+c[14]) {
|
||||
OPENSSL_free(c);
|
||||
return std::string();
|
||||
}
|
||||
std::string res((char*)c+15, c[14]);
|
||||
OPENSSL_free(c);
|
||||
return res;
|
||||
@@ -1317,7 +1322,7 @@ namespace openssl {
|
||||
TCP& write(const std::string& s) {
|
||||
OPENSSL_LOG("log");
|
||||
if (_bio<=0) throw tcp_closed_connection();
|
||||
int x(BIO_write(_bio, s.begin().operator->(), s.size()));
|
||||
unsigned int x(BIO_write(_bio, s.begin().operator->(), s.size()));
|
||||
if (x<=0)
|
||||
if (BIO_should_retry(_bio)) return write(s);
|
||||
else {
|
||||
|
Reference in New Issue
Block a user