diff --git a/ChangeLog b/ChangeLog index 37de53dc4..7bc84b0f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-11 Badlop + + * src/ejabberd_s2s_in.erl (get_cert_domains): When compiling with + Erlang R12, replace the calls to deprecated module PKIX1Explicit88 + with OTP-PKIX (EJAB-556) + 2008-03-10 Badlop * src/ejabberd_update.erl: Fix crash when browsing the Update diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl index 4aa87956f..623339845 100644 --- a/src/ejabberd_s2s_in.erl +++ b/src/ejabberd_s2s_in.erl @@ -50,9 +50,13 @@ -include("jlib.hrl"). -ifdef(SSL39). -include_lib("ssl/include/ssl_pkix.hrl"). +-define(PKIXEXPLICIT, 'OTP-PKIX'). +-define(PKIXIMPLICIT, 'OTP-PKIX'). -else. -include_lib("ssl/include/PKIX1Explicit88.hrl"). -include_lib("ssl/include/PKIX1Implicit88.hrl"). +-define(PKIXEXPLICIT, 'PKIX1Explicit88'). +-define(PKIXIMPLICIT, 'PKIX1Implicit88'). -endif. -include("XmppAddr.hrl"). @@ -603,7 +607,7 @@ get_cert_domains(Cert) -> lists:flatmap( fun(#'AttributeTypeAndValue'{type = ?'id-at-commonName', value = Val}) -> - case 'PKIX1Explicit88':decode('X520CommonName', Val) of + case ?PKIXEXPLICIT:decode('X520CommonName', Val) of {ok, {_, D1}} -> D = if is_list(D1) -> D1; @@ -637,7 +641,7 @@ get_cert_domains(Cert) -> is_binary(Val) -> Val; true -> Val end, - case 'PKIX1Implicit88':decode('SubjectAltName', BVal) of + case ?PKIXIMPLICIT:decode('SubjectAltName', BVal) of {ok, SANs} -> lists:flatmap( fun({otherName,