mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 03:29:35 -05:00
Fix ldap_X509dn2bv, OpenSSL gives us DN attributeTypes in EBCDIC
This commit is contained in:
parent
f22855e6be
commit
90b1e7bd45
1 changed files with 10 additions and 0 deletions
|
|
@ -3390,9 +3390,16 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func,
|
|||
goto get_oid;
|
||||
newAVA->la_attr.bv_val = (char *)OBJ_nid2sn( n );
|
||||
newAVA->la_attr.bv_len = strlen( newAVA->la_attr.bv_val );
|
||||
#ifdef HAVE_EBCDIC
|
||||
newAVA->la_attr.bv_val = LDAP_STRDUP( newAVA->la_attr.bv_val );
|
||||
__etoa( newAVA->la_attr.bv_val );
|
||||
#endif
|
||||
} else {
|
||||
get_oid: newAVA->la_attr.bv_val = oidptr;
|
||||
newAVA->la_attr.bv_len = OBJ_obj2txt( oidptr, oidrem, obj, 1 );
|
||||
#ifdef HAVE_EBCDIC
|
||||
__etoa( newAVA->la_attr.bv_val );
|
||||
#endif
|
||||
oidptr += newAVA->la_attr.bv_len + 1;
|
||||
oidrem -= newAVA->la_attr.bv_len + 1;
|
||||
|
||||
|
|
@ -3468,6 +3475,9 @@ to_utf8: rc = ldap_ucs_to_utf8s( &Val, csize, &newAVA->la_value );
|
|||
nomem:
|
||||
for (;baseAVA < newAVA; baseAVA++) {
|
||||
LDAP_FREE( baseAVA->la_value.bv_val );
|
||||
#ifdef HAVE_EBCDIC
|
||||
if ( !func ) LDAP_FREE( baseAVA->la_attr.bv_val );
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( oidsize != 0 )
|
||||
|
|
|
|||
Loading…
Reference in a new issue