Skip to content

Commit d41d44f

Browse files
committed
OTP-PUB-KEY -> PKIXAlgs-2009 for OTP28+
1 parent 9857acb commit d41d44f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

deps/rabbit_common/src/rabbit_cert_info.erl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,18 @@ find_by_type(Type, {rdnSequence, RDNs}) ->
109109
%% Formatting functions
110110
%%--------------------------------------------------------------------------
111111

112+
113+
-if (?OTP_RELEASE >= 28).
114+
-define(M, 'PKIXAlgs-2009').
115+
-else.
116+
-define(M, 'OTP-PUB-KEY').
117+
-endif.
118+
112119
sanitize_other_name(Bin) when is_binary(Bin) ->
113120
%% We make a wild assumption about the types here
114121
%% but ASN.1 decoding functions in OTP only offer so much and SAN values
115122
%% are expected to be "string-like" by RabbitMQ
116-
case 'OTP-PUB-KEY':decode('DirectoryString', Bin) of
123+
case ?M:decode('DirectoryString', Bin) of
117124
{ok, {_, Val}} -> Val;
118125
Other -> Other
119126
end.

0 commit comments

Comments
 (0)