tls/openssl: fix openssl-0.9.8 support
0.9.8 doesn't implement GENERAL_NAME_get0_otherName().
This commit is contained in:
@@ -54,6 +54,21 @@ static const unsigned char *ASN1_STRING_get0_data(ASN1_STRING *asn1)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||||
|
static int GENERAL_NAME_get0_otherName(const GENERAL_NAME *gen,
|
||||||
|
ASN1_OBJECT **poid,
|
||||||
|
ASN1_TYPE **pvalue)
|
||||||
|
{
|
||||||
|
if (gen->type != GEN_OTHERNAME)
|
||||||
|
return 0;
|
||||||
|
if (poid)
|
||||||
|
*poid = gen->d.otherName->type_id;
|
||||||
|
if (pvalue)
|
||||||
|
*pvalue = gen->d.otherName->value;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
struct _tls {
|
struct _tls {
|
||||||
xmpp_ctx_t *ctx;
|
xmpp_ctx_t *ctx;
|
||||||
sock_t sock;
|
sock_t sock;
|
||||||
|
|||||||
Reference in New Issue
Block a user