diff --git a/ssl.pl b/ssl.pl index e7e55b4..57889b3 100644 --- a/ssl.pl +++ b/ssl.pl @@ -340,7 +340,19 @@ ssl_upgrade_legacy_options(O1, O4) :- ), select_option(cacerts(CACerts), O2, O3, []), ssl_upgrade_legacy_options([cacerts([Term|CACerts])|O3], O4). -ssl_upgrade_legacy_options(Options, Options). + +% DMILES + +ssl_upgrade_legacy_options(A,A):- \+ current_prolog_flag(logicmoo_ssl, legacy), !. +ssl_upgrade_legacy_options([Skip|Options], SSLOptions):- nonvar(Skip), ssl_skip(Skip),!, + ssl_upgrade_legacy_options(Options, SSLOptions). +ssl_upgrade_legacy_options([O1|Options], [O2|SSLOptions]):- ssl_option_upgrade(O1,O2), + ssl_upgrade_legacy_options(Options, SSLOptions). +ssl_upgrade_legacy_options([],[]). + +ssl_skip(header(content_type,_)). +ssl_skip(header(expires,_)). +ssl_option_upgrade(O1,O1):-!. %! ssl_add_certificate_key(+SSL0, +Certificate, +Key, -SSL)