ldap_charray_free( dirs );
}
if ( cert ) {
- X509_NAME *xn = X509_get_subject_name( cert );
- xn = X509_NAME_dup( xn );
+ const X509_NAME *cxn = X509_get_subject_name( cert );
+ X509_NAME *xn = X509_NAME_dup( cxn );
if ( xn && ca_list ) {
sk_X509_NAME_push( ca_list, xn );
}
{
tlso_session *s = (tlso_session *)sess;
X509 *x;
- X509_NAME *xn;
+ const X509_NAME *xn;
x = SSL_get_certificate( s );
{
tlso_session *s = (tlso_session *)sess;
X509 *x = tlso_get_cert( s );
- X509_NAME *xn;
+ const X509_NAME *xn;
if ( !x )
return LDAP_INVALID_CREDENTIALS;
if (chkSAN) {
i = X509_get_ext_by_NID(x, NID_subject_alt_name, -1);
if (i >= 0) {
- X509_EXTENSION *ex;
+ const X509_EXTENSION *ex;
STACK_OF(GENERAL_NAME) *alt;
ex = X509_get_ext(x, i);
}
if (ret != LDAP_SUCCESS) {
- X509_NAME *xn;
- X509_NAME_ENTRY *ne;
+ const X509_NAME *xn;
+ const X509_NAME_ENTRY *ne;
ASN1_OBJECT *obj;
- ASN1_STRING *cn = NULL;
+ const ASN1_STRING *cn = NULL;
char *cnstr;
int cnlen;
int navas;
X509 *cert;
int errnum;
int errdepth;
- X509_NAME *subject;
- X509_NAME *issuer;
+ const X509_NAME *subject;
+ const X509_NAME *issuer;
char *sname;
char *iname;
char *certerr = NULL;
#if OPENSSL_VERSION_NUMBER >= 0x10100000
#include <openssl/rsa.h>
+#ifndef X509_get_notBefore
#define X509_get_notBefore(x) X509_getm_notBefore(x)
+#endif
+#ifndef X509_get_notAfter
#define X509_get_notAfter(x) X509_getm_notAfter(x)
#endif
+#endif
#if OPENSSL_VERSION_MAJOR >= 3
#define BN_pseudo_rand(bn, bits, top, bottom) BN_rand(bn, bits, top, bottom)
static int autoca_gencert( Operation *op, genargs *args )
{
- X509_NAME *subj_name, *issuer_name;
+ X509_NAME *subj_name;
+ const X509_NAME *issuer_name;
X509 *subj_cert;
struct berval derdn;
unsigned char *pp;