mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#5849 free peer cert after retrieving DN
This commit is contained in:
parent
65530005ee
commit
187efdad6c
@ -1735,6 +1735,7 @@ tls_get_cert_dn( tls_session *session, struct berval *dnbv )
|
||||
xn = X509_get_subject_name(x);
|
||||
dnbv->bv_len = i2d_X509_NAME( xn, NULL );
|
||||
dnbv->bv_val = xn->bytes->data;
|
||||
X509_free(x);
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_GNUTLS */
|
||||
|
@ -452,6 +452,7 @@ tlso_session_my_dn( tls_session *sess, struct berval *der_dn )
|
||||
xn = X509_get_subject_name(x);
|
||||
der_dn->bv_len = i2d_X509_NAME( xn, NULL );
|
||||
der_dn->bv_val = xn->bytes->data;
|
||||
X509_free(x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -478,6 +479,7 @@ tlso_session_peer_dn( tls_session *sess, struct berval *der_dn )
|
||||
xn = X509_get_subject_name(x);
|
||||
der_dn->bv_len = i2d_X509_NAME( xn, NULL );
|
||||
der_dn->bv_val = xn->bytes->data;
|
||||
X509_free(x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user