mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
compile fix for openssl 1.0.0
- and remove trailing newline when displaying extension texts - show the correct year when displaying times. 2009 instead of 109
This commit is contained in:
parent
76a1a2286c
commit
30f186caa3
@ -112,7 +112,7 @@ QString a1time::toSortable() const
|
||||
}
|
||||
|
||||
return QString("%1-%2-%3 %4").
|
||||
arg(tm.tm_year, 4, 10, c).
|
||||
arg(tm.tm_year +1900, 4, 10, c).
|
||||
arg((unsigned)tm.tm_mon +1, 2, 10, c).
|
||||
arg((unsigned)tm.tm_mday, 2, 10, c).
|
||||
arg(g==1 ? "GMT" : "");
|
||||
|
||||
@ -108,7 +108,7 @@ QString x509v3ext::getValue() const
|
||||
text = QString::fromLocal8Bit(p, len);
|
||||
}
|
||||
BIO_free(bio);
|
||||
return text;
|
||||
return text.trimmed();
|
||||
}
|
||||
|
||||
static void *ext_str_new(X509_EXTENSION *ext)
|
||||
@ -134,10 +134,16 @@ static void ext_str_free(X509_EXTENSION *ext, void *ext_str)
|
||||
method->ext_free(ext_str);
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
#define C_X509V3_EXT_METHOD const X509V3_EXT_METHOD
|
||||
#else
|
||||
#define C_X509V3_EXT_METHOD X509V3_EXT_METHOD
|
||||
#endif
|
||||
|
||||
QString x509v3ext::i2s()
|
||||
{
|
||||
QString str;
|
||||
X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
|
||||
C_X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
|
||||
void *ext_str = ext_str_new(ext);
|
||||
|
||||
if (!ext_str)
|
||||
@ -151,7 +157,7 @@ QString x509v3ext::i2s()
|
||||
|
||||
QStringList x509v3ext::i2v()
|
||||
{
|
||||
X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
|
||||
C_X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
|
||||
void *ext_str = ext_str_new(ext);
|
||||
QStringList sl;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user