aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eldap/src/eldap.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-01-25 12:45:26 +0100
committerBjörn Gustavsson <[email protected]>2013-01-25 12:45:26 +0100
commit9afbb879f0397a650a7c403911a8cc30daa6dbbe (patch)
tree8e0d77907994cd3e6397b12349abd35a63375235 /lib/eldap/src/eldap.erl
parent61f8a41388d95f6b8c0e2e5a06de586cecf184c6 (diff)
parentb06cbaf8cf12a9b6dcbdc6eab873a6212206ef58 (diff)
downloadotp-9afbb879f0397a650a7c403911a8cc30daa6dbbe.tar.gz
otp-9afbb879f0397a650a7c403911a8cc30daa6dbbe.tar.bz2
otp-9afbb879f0397a650a7c403911a8cc30daa6dbbe.zip
Merge branch 'bjorn/asn1/further-cleanup/OTP-10588'
* bjorn/asn1/further-cleanup/OTP-10588: (28 commits) Don't export encode_disp/2 and decode_disp/2 in generated modules Remove vestiges of support for the {TypeName,Value} notation Simplify the functions for decoding lengths per,uper: Optimize decoding of the remaining data types per,uper: Optimize decoding of the remaining string types Share all code for dec_gen_prim/3 between per/uper back-ends per,uper: Optimize decoding of the string data types testPrimStrings: Test some constraints By default, encode BIT STRING to bitstrings Teach encode functions to accept a bitstring term for a BIT STRING Fix EXTERNAL 1990/1994 conversion information loss uper: Look up some SizeConstraints at compile-time Enumeration decoding: Don't emit a default clause if it cannot match Slightly optimize per encoding of large INTEGERs with constraints BER run-time: Refactor decoding of string data types Refactor decoding of BIT STRINGs Optimize encoding of ENUMERATED in per and uper Remove the unused run-time modules eldap: Remove calls to undocumented asn1rt* functions BER: Correct bug in 'undec_rest' ...
Diffstat (limited to 'lib/eldap/src/eldap.erl')
-rw-r--r--lib/eldap/src/eldap.erl20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl
index d030408770..d11f904996 100644
--- a/lib/eldap/src/eldap.erl
+++ b/lib/eldap/src/eldap.erl
@@ -699,7 +699,6 @@ do_recv(S, #eldap{use_tls=true, timeout=Timeout}, Len) ->
recv_response(S, Data) ->
case do_recv(S, Data, 0) of
{ok, Packet} ->
- check_tag(Packet),
case asn1rt:decode('ELDAPv3', 'LDAPMessage', Packet) of
{ok,Resp} -> {ok,Resp};
Error -> throw(Error)
@@ -708,21 +707,6 @@ recv_response(S, Data) ->
throw({gen_tcp_error, Reason})
end.
-%%% Sanity check of received packet
-check_tag(Data) ->
- try
- {_Tag, Data1, _Rb} = asn1rt_ber_bin:decode_tag(l2b(Data)),
- try
- {{_Len, _Data2}, _Rb2} = asn1rt_ber_bin:decode_length(l2b(Data1)),
- ok
- catch
- _ -> throw({error,decoded_tag_length})
- end
- catch
- _ ->
- throw({error, decoded_tag})
- end.
-
%%% Check for expected kind of reply
check_reply(Data, {ok,Msg}, Op) when
Msg#'LDAPMessage'.messageID == Data#eldap.id ->
@@ -1115,7 +1099,3 @@ get_head(Str,Tail) ->
%%% Should always succeed !
get_head([H|Tail],Tail,Rhead) -> lists:reverse([H|Rhead]);
get_head([H|Rest],Tail,Rhead) -> get_head(Rest,Tail,[H|Rhead]).
-
-l2b(B) when is_binary(B) -> B;
-l2b(L) when is_list(L) -> list_to_binary(L).
-