]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberd_s2s_in.erl (get_cert_domains): When compiling with
authorBadlop <badlop@process-one.net>
Tue, 11 Mar 2008 14:25:35 +0000 (14:25 +0000)
committerBadlop <badlop@process-one.net>
Tue, 11 Mar 2008 14:25:35 +0000 (14:25 +0000)
Erlang R12, replace the calls to deprecated module PKIX1Explicit88
with OTP-PKIX (EJAB-556)

SVN Revision: 1226

ChangeLog
src/ejabberd_s2s_in.erl

index 37de53dc42b2c27f9f41744ec64569e3d6767e22..7bc84b0f86d2e102a877e29efaacd279d117788e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-11  Badlop  <badlop@process-one.net>
+
+       * 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  <badlop@process-one.net>
 
        * src/ejabberd_update.erl: Fix crash when browsing the Update
index 4aa87956feb54601ee113426f821a6146566a8e1..623339845f2c8e488ce6bc43040df7adf7a6713c 100644 (file)
 -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,