Home
last modified time | relevance | path

Searched refs:ber (Results 1 – 25 of 136) sorted by relevance

123456

/illumos-gate/usr/src/lib/libkmf/ber_der/common/
H A Dio.c55 nleft = ber->ber_end - ber->ber_ptr; in kmfber_read()
111 ber->ber_end = ber->ber_buf + total; in kmfber_realloc()
119 ber->ber_ptr = ber->ber_buf + (ber->ber_ptr - oldbuf); in kmfber_realloc()
184 ber->ber_ptr = ber->ber_buf; in kmfber_alloc_t()
232 ber->ber_end = ber->ber_ptr; in kmfber_reset()
233 ber->ber_ptr = ber->ber_buf; in kmfber_reset()
235 ber->ber_ptr = ber->ber_end; in kmfber_reset()
249 ber->ber_buf, ber->ber_ptr, ber->ber_rwptr, ber->ber_end); in ber_dump()
253 ber->ber_end - ber->ber_ptr); in ber_dump()
255 lber_bprint(ber->ber_ptr, ber->ber_end - ber->ber_ptr); in ber_dump()
[all …]
H A Dencode.c455 if (ber->ber_sos->sos_ptr > ber->ber_end) { in ber_start_seqorset()
456 if (kmfber_realloc(ber, ber->ber_sos->sos_ptr - in ber_start_seqorset()
622 rc = kmfber_put_boolean(ber, i, ber->ber_tag); in kmfber_printf()
627 rc = ber_put_int(ber, (ber_int_t)i, ber->ber_tag); in kmfber_printf()
633 rc = ber_put_oid(ber, oid, ber->ber_tag); in kmfber_printf()
638 rc = ber_put_big_int(ber, ber->ber_tag, s, len); in kmfber_printf()
651 rc = kmfber_put_null(ber, ber->ber_tag); in kmfber_printf()
657 rc = kmfber_put_ostring(ber, s, len, ber->ber_tag); in kmfber_printf()
662 rc = kmfber_put_string(ber, s, ber->ber_tag); in kmfber_printf()
702 rc = kmfber_start_seq(ber, ber->ber_tag); in kmfber_printf()
[all …]
H A Ddecode.c65 kmfber_get_tag(BerElement *ber) in kmfber_get_tag() argument
168 bercopy.ber_end = ber->ber_end; in kmfber_peek_tag()
169 bercopy.ber_ptr = ber->ber_ptr; in kmfber_peek_tag()
427 kmfber_get_null(BerElement *ber) in kmfber_get_null() argument
461 *last = ber->ber_ptr + *len; in kmfber_first_element()
463 if (*last == ber->ber_ptr) { in kmfber_first_element()
473 if (ber->ber_ptr == last) { in kmfber_next_element()
535 rc = ber_get_oid(ber, bval); in kmfber_scanf()
549 rc = kmfber_get_null(ber); in kmfber_scanf()
567 rc = ber_get_bigint(ber, bvp); in kmfber_scanf()
[all …]
/illumos-gate/usr/src/lib/libldap5/sources/ldap/ber/
H A Dencode.c397 if (ber->ber_sos->sos_ptr > ber->ber_end) { in ber_start_seqorset()
398 nslberi_ber_realloc(ber, ber->ber_sos->sos_ptr - ber->ber_end); in ber_start_seqorset()
584 rc = ber_put_boolean( ber, i, ber->ber_tag ); in ber_printf()
589 rc = ber_put_int( ber, (ber_int_t)i, ber->ber_tag ); in ber_printf()
598 rc = ber_put_null( ber, ber->ber_tag ); in ber_printf()
604 rc = ber_put_ostring( ber, s, len, ber->ber_tag ); in ber_printf()
611 rc = ber_put_ostring( ber, "", 0, ber->ber_tag ); in ber_printf()
620 rc = ber_put_string( ber, s, ber->ber_tag ); in ber_printf()
626 rc = ber_put_bitstring( ber, s, len, ber->ber_tag ); in ber_printf()
655 rc = ber_start_seq( ber, ber->ber_tag ); in ber_printf()
[all …]
H A Dio.c278 ber->ber_ptr = ber->ber_buf + (ber->ber_ptr - oldbuf); in nslberi_ber_realloc()
342 ber->ber_rwptr = ber->ber_buf; in ber_flush()
439 ber->ber_ptr = ber->ber_buf; in ber_alloc_t()
501 ber->ber_end = ber->ber_ptr; in ber_reset()
502 ber->ber_ptr = ber->ber_buf; in ber_reset()
504 ber->ber_ptr = ber->ber_end; in ber_reset()
518 ber->ber_buf, ber->ber_ptr, ber->ber_rwptr, ber->ber_end ); in ber_dump()
524 lber_bprint( ber->ber_ptr, ber->ber_end - ber->ber_ptr ); in ber_dump()
529 lber_bprint( ber->ber_buf, ber->ber_ptr - ber->ber_buf ); in ber_dump()
683 ber->ber_ptr = ber->ber_buf; in ber_get_next()
[all …]
H A Ddecode.c53 ber_get_tag( BerElement *ber ) in ber_get_tag() argument
156 bercopy.ber_end = ber->ber_end; in ber_peek_tag()
157 bercopy.ber_ptr = ber->ber_ptr; in ber_peek_tag()
373 ber_get_null( BerElement *ber ) in ber_get_null() argument
409 *last = ber->ber_ptr + *len; in ber_first_element()
422 if ( ber->ber_ptr == last ) { in ber_next_element()
451 ber_dump( ber, 1 ); in ber_scanf()
470 rc = ber_get_int( ber, l ); in ber_scanf()
479 rc = ber_get_null( ber ); in ber_scanf()
576 ber->ber_ptr += len; in ber_scanf()
[all …]
/illumos-gate/usr/src/cmd/ldap/common/
H A Detest.c37 BerElement *ber; in main() local
95 rc = ber_put_enum( ber, i, (char)ber->ber_tag ); in main()
99 rc = ber_put_null( ber, (char)ber->ber_tag ); in main()
105 rc = ber_put_ostring( ber, s, len, (char)ber->ber_tag ); in main()
110 rc = ber_put_string( ber, s, (char)ber->ber_tag ); in main()
116 rc = ber_put_bitstring( ber, s, len, (char)ber->ber_tag ); in main()
121 ber->ber_usertag = 1; in main()
145 rc = ber_start_seq( ber, (char)ber->ber_tag ); in main()
149 rc = ber_put_seqorset( ber ); in main()
153 rc = ber_start_set( ber, (char)ber->ber_tag ); in main()
[all …]
/illumos-gate/usr/src/head/
H A Dlber.h146 ber_tag_t LDAP_CALL ber_get_tag(BerElement *ber);
147 ber_tag_t LDAP_CALL ber_skip_tag(BerElement *ber,
149 ber_tag_t LDAP_CALL ber_peek_tag(BerElement *ber,
154 ber_tag_t LDAP_CALL ber_get_stringa(BerElement *ber,
156 ber_tag_t LDAP_CALL ber_get_stringal(BerElement *ber,
158 ber_tag_t ber_get_bitstringa(BerElement *ber,
160 ber_tag_t LDAP_CALL ber_get_null(BerElement *ber);
161 ber_tag_t LDAP_CALL ber_get_boolean(BerElement *ber,
194 int LDAP_CALL ber_put_seq(BerElement *ber);
195 int LDAP_CALL ber_put_set(BerElement *ber);
[all …]
/illumos-gate/usr/src/lib/libldap5/sources/ldap/common/
H A Dgetattr.c47 bytes_remaining( BerElement *ber ) in bytes_remaining() argument
51 if ( ber_get_option( ber, LBER_OPT_REMAINING_BYTES, &len ) != 0 ) { in bytes_remaining()
81 **ber = *entry->lm_ber; in ldap_first_attribute()
91 if ( ber_scanf( *ber, "{xl{", &seqlength ) != LBER_ERROR && in ldap_first_attribute()
92 ber_set_option( *ber, LBER_OPT_REMAINING_BYTES, &seqlength ) in ldap_first_attribute()
98 if ( ber_scanf( *ber, "{ax}", &attr ) != LBER_ERROR || in ldap_first_attribute()
99 bytes_remaining( *ber ) == 0 ) { in ldap_first_attribute()
106 ber_free( *ber, 0 ); in ldap_first_attribute()
107 *ber = NULL; in ldap_first_attribute()
135 if ( ber_scanf( ber, "{ax}", &attr ) != LBER_ERROR || in ldap_next_attribute()
[all …]
H A Dsearch.c165 BerElement *ber; in nsldapi_search() local
225 (char *) base, ber ); in nsldapi_search()
284 BerElement *ber; in nsldapi_build_search_req() local
346 ber_free( ber, 1 ); in nsldapi_build_search_req()
353 ber_free( ber, 1 ); in nsldapi_build_search_req()
361 ber_free( ber, 1 ); in nsldapi_build_search_req()
367 ber_free( ber, 1 ); in nsldapi_build_search_req()
373 ber_free( ber, 1 ); in nsldapi_build_search_req()
377 *berp = ber; in nsldapi_build_search_req()
408 BerElement *ber, in put_complex_filter() argument
[all …]
H A Dpsearch.c32 BerElement *ber; in ldap_create_persistentsearch_control() local
62 if ( ber_printf( ber, "{ibb}", changetypes, changesonly, in ldap_create_persistentsearch_control()
64 ber_free( ber, 1 ); in ldap_create_persistentsearch_control()
83 BerElement *ber; in ldap_parse_entrychange_control() local
127 if ( ber_scanf( ber, "{e", &along ) == LBER_ERROR ) { in ldap_parse_entrychange_control()
128 ber_free( ber, 1 ); in ldap_parse_entrychange_control()
135 if ( ber_scanf( ber, "a", &previousdn ) == LBER_ERROR ) { in ldap_parse_entrychange_control()
136 ber_free( ber, 1 ); in ldap_parse_entrychange_control()
154 if ( ber_peek_tag( ber, &len ) == LBER_INTEGER in ldap_parse_entrychange_control()
155 && ber_get_int( ber, chgnump ) != LBER_ERROR ) { in ldap_parse_entrychange_control()
[all …]
H A Dvlistctrl.c80 BerElement *ber; in ldap_create_virtuallist_control() local
100 if ( LBER_ERROR == ber_printf( ber, in ldap_create_virtuallist_control()
107 ber_free( ber, 1 ); in ldap_create_virtuallist_control()
113 if ( LBER_ERROR == ber_printf( ber, in ldap_create_virtuallist_control()
121 ber_free( ber, 1 ); in ldap_create_virtuallist_control()
127 if ( LBER_ERROR == ber_printf( ber, in ldap_create_virtuallist_control()
133 ber_free( ber, 1 ); in ldap_create_virtuallist_control()
140 ber, in ldap_create_virtuallist_control()
187 BerElement *ber; in ldap_parse_virtuallist_control() local
232 ber_free( ber, 1 ); in ldap_parse_virtuallist_control()
[all …]
H A Dsortctrl.c47 BerElement *ber; in ldap_create_sort_control() local
66 if ( ber_printf( ber, "{" ) == -1 ) { in ldap_create_sort_control()
98 if ( ber_printf( ber, "}" ) == -1 ) { in ldap_create_sort_control()
105 if ( ber_printf( ber, "}" ) == -1 ) { in ldap_create_sort_control()
117 ber_free( ber, 1 ); in ldap_create_sort_control()
146 BerElement *ber; in ldap_parse_sort_control() local
185 ber_free( ber, 1 ); in ldap_parse_sort_control()
193 ber_free( ber, 1 ); in ldap_parse_sort_control()
201 if ( ber_scanf( ber, "}" ) == LBER_ERROR ) { in ldap_parse_sort_control()
203 ber_free( ber, 1 ); in ldap_parse_sort_control()
[all …]
H A Dproxyauthctrl.c53 BerElement *ber; in ldap_create_proxyauth_control() local
70 if ( ( nsldapi_alloc_ber_with_options( ld, &ber ) ) != LDAP_SUCCESS ) { in ldap_create_proxyauth_control()
77 if ( LBER_ERROR == ber_printf( ber, in ldap_create_proxyauth_control()
82 ber_free( ber, 1 ); in ldap_create_proxyauth_control()
86 rc = nsldapi_build_control( LDAP_CONTROL_PROXYAUTH, ber, 1, in ldap_create_proxyauth_control()
117 BerElement *ber; in ldap_create_proxiedauth_control() local
130 if ( ( nsldapi_alloc_ber_with_options( ld, &ber ) ) != LDAP_SUCCESS ) { in ldap_create_proxiedauth_control()
137 if ( LBER_ERROR == ber_printf( ber, in ldap_create_proxiedauth_control()
142 ber_free( ber, 1 ); in ldap_create_proxiedauth_control()
146 rc = nsldapi_build_control( LDAP_CONTROL_PROXIEDAUTH, ber, 1, 1, ctrlp ); in ldap_create_proxiedauth_control()
H A Dcontrol.c36 BerElement *ber ) in nsldapi_put_controls() argument
93 if ( ber_printf( ber, "o", c->ldctl_value.bv_val, in nsldapi_put_controls()
100 if ( ber_put_seq( ber ) == -1 ) { in nsldapi_put_controls()
105 if ( ber_put_seq( ber ) == -1 ) { in nsldapi_put_controls()
111 if ( closeseq && ber_put_seq( ber ) == -1 ) { in nsldapi_put_controls()
184 for ( tag = ber_first_element( ber, &len, &last ); in nsldapi_get_controls()
186 tag = ber_next_element( ber, &len, last ) ) { in nsldapi_get_controls()
207 if ( ber_scanf( ber, "{a", &newctrl->ldctl_oid ) in nsldapi_get_controls()
451 if ( ber == NULL ) { in nsldapi_build_control()
455 rc = ber_flatten( ber, &bvp ); in nsldapi_build_control()
[all …]
H A Dextendop.c46 BerElement *ber; in ldap_extended_operation() local
98 if (( rc = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_extended_operation()
104 if ( ber_printf( ber, "{it{tsto}", msgid, LDAP_REQ_EXTENDED, in ldap_extended_operation()
109 ber_free( ber, 1 ); in ldap_extended_operation()
113 if (( rc = nsldapi_put_controls( ld, serverctrls, 1, ber )) in ldap_extended_operation()
115 ber_free( ber, 1 ); in ldap_extended_operation()
121 ber ); in ldap_extended_operation()
188 struct berelement ber; in ldap_parse_extended_result() local
205 ber = *(res->lm_ber); in ldap_parse_extended_result()
216 if ( ber_scanf( &ber, "a", &roid ) == LBER_ERROR ) { in ldap_parse_extended_result()
[all …]
H A Dsaslbind.c56 BerElement *ber; in ldap_sasl_bind() local
111 if (( rc = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_sasl_bind()
131 rc = ber_printf( ber, "{it{ist{s}}", msgid, in ldap_sasl_bind()
135 rc = ber_printf( ber, "{it{ist{so}}", msgid, in ldap_sasl_bind()
144 ber_free( ber, 1 ); in ldap_sasl_bind()
150 ber_free( ber, 1 ); in ldap_sasl_bind()
156 (char *)dn, ber ); in ldap_sasl_bind()
222 BerElement ber; in ldap_parse_sasl_bind_result() local
256 ber = *(res->lm_ber); /* struct copy */ in ldap_parse_sasl_bind_result()
259 rc = ber_scanf( &ber, "{iaa}", &along, &m, &e ); in ldap_parse_sasl_bind_result()
[all …]
H A Dadd.c85 BerElement *ber; in ldap_add_ext() local
138 if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_add_ext()
143 if ( ber_printf( ber, "{it{s{", *msgidp, LDAP_REQ_ADD, dn ) in ldap_add_ext()
147 ber_free( ber, 1 ); in ldap_add_ext()
154 rc = ber_printf( ber, "{s[V]}", attrs[i]->mod_type, in ldap_add_ext()
157 rc = ber_printf( ber, "{s[v]}", attrs[i]->mod_type, in ldap_add_ext()
163 ber_free( ber, 1 ); in ldap_add_ext()
168 if ( ber_printf( ber, "}}" ) == -1 ) { in ldap_add_ext()
171 ber_free( ber, 1 ); in ldap_add_ext()
177 ber_free( ber, 1 ); in ldap_add_ext()
[all …]
H A Dmodify.c78 BerElement *ber; in ldap_modify_ext() local
136 if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_modify_ext()
141 if ( ber_printf( ber, "{it{s{", *msgidp, LDAP_REQ_MODIFY, dn ) in ldap_modify_ext()
145 ber_free( ber, 1 ); in ldap_modify_ext()
152 rc = ber_printf( ber, "{e{s[V]}}", in ldap_modify_ext()
156 rc = ber_printf( ber, "{e{s[v]}}", mods[i]->mod_op, in ldap_modify_ext()
163 ber_free( ber, 1 ); in ldap_modify_ext()
168 if ( ber_printf( ber, "}}" ) == -1 ) { in ldap_modify_ext()
171 ber_free( ber, 1 ); in ldap_modify_ext()
177 ber_free( ber, 1 ); in ldap_modify_ext()
[all …]
H A Drename.c72 BerElement *ber; in ldap_rename() local
142 if (( err = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_rename()
148 if ( ber_printf( ber, "{it{ssb", *msgidp, LDAP_REQ_MODDN, dn, in ldap_rename()
151 ber_free( ber, 1 ); in ldap_rename()
156 if ( ber_printf( ber, "}" ) == -1 ) { in ldap_rename()
158 ber_free( ber, 1 ); in ldap_rename()
162 if ( ber_printf( ber, "ts}", LDAP_TAG_NEWSUPERIOR, newparent ) in ldap_rename()
165 ber_free( ber, 1 ); in ldap_rename()
170 if (( rc = nsldapi_put_controls( ld, serverctrls, 1, ber )) in ldap_rename()
172 ber_free( ber, 1 ); in ldap_rename()
[all …]
H A Ddelete.c65 BerElement *ber; in ldap_delete_ext() local
105 if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_delete_ext()
110 if ( ber_printf( ber, "{its", *msgidp, LDAP_REQ_DELETE, dn ) in ldap_delete_ext()
114 ber_free( ber, 1 ); in ldap_delete_ext()
118 if (( lderr = nsldapi_put_controls( ld, serverctrls, 1, ber )) in ldap_delete_ext()
120 ber_free( ber, 1 ); in ldap_delete_ext()
126 (char *)dn, ber ); in ldap_delete_ext()
H A Drequest.c107 ber_free( ber, 1 ); in nsldapi_send_initial_request()
222 ber_free( ber, 1 ); in nsldapi_send_server_request()
243 ber_free( ber, 1 ); in nsldapi_send_server_request()
255 lr->lr_ber = ber; in nsldapi_send_server_request()
299 ber->ber_end = ber->ber_ptr; in nsldapi_send_server_request()
300 ber->ber_ptr = ber->ber_buf; in nsldapi_send_server_request()
953 BerElement *ber; in chase_one_referral() local
993 ber_free( ber, 1 ); in chase_one_referral()
1018 ber_free(ber, 1); in chase_one_referral()
1117 BerElement *ber; in re_encode_request() local
[all …]
H A Dgetvalues.c45 struct berelement ber; in internal_ldap_get_values() local
61 ber = *entry->lm_ber; in internal_ldap_get_values()
64 if ( ber_scanf( &ber, "{x{{a", &attr ) == LBER_ERROR ) { in internal_ldap_get_values()
73 if ( ber_scanf( &ber, "x}{a", &attr ) == LBER_ERROR ) { in internal_ldap_get_values()
94 rc = ber_scanf( &ber, "[V]", &vals ); in internal_ldap_get_values()
96 rc = ber_scanf( &ber, "[v]", &vals ); in internal_ldap_get_values()
333 struct berelement ber; in internal_ldap_get_lang_values() local
381 ber = *entry->lm_ber; in internal_ldap_get_lang_values()
416 rc = ber_scanf( &ber, "[V]}", &vals ); in internal_ldap_get_lang_values()
418 rc = ber_scanf( &ber, "[v]}", &vals ); in internal_ldap_get_lang_values()
[all …]
H A Dcompare.c74 BerElement *ber; in ldap_compare_ext() local
121 if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber )) in ldap_compare_ext()
126 if ( ber_printf( ber, "{it{s{so}}", *msgidp, LDAP_REQ_COMPARE, dn, in ldap_compare_ext()
131 ber_free( ber, 1 ); in ldap_compare_ext()
135 if (( lderr = nsldapi_put_controls( ld, serverctrls, 1, ber )) in ldap_compare_ext()
137 ber_free( ber, 1 ); in ldap_compare_ext()
143 (char *)dn, ber ); in ldap_compare_ext()
H A Dspagectrl.c26 BerElement *ber; in ldap_create_page_control() local
32 if ((ber = ber_alloc_t(LBER_USE_DER)) == NULLBER){ in ldap_create_page_control()
36 if (ber_printf(ber, "{io}", pagesize, in ldap_create_page_control()
40 ber_free(ber, 1); in ldap_create_page_control()
44 rc = nsldapi_build_control(LDAP_CONTROL_SIMPLE_PAGE, ber, 1, isCritical, in ldap_create_page_control()

123456