Take the leaf of a certificate chain if one is provided
[dcpomatic.git] / src / wx / config_dialog.cc
index ac5d90296b0982a26f6fedc26c498ca63927f684..0369070a7c32edd900588ec56a6b5568e775a33b 100644 (file)
@@ -773,8 +773,9 @@ private:
 
                if (d->ShowModal() == wxID_OK) {
                        try {
-                               dcp::Certificate c (dcp::file_to_string (wx_to_std (d->GetPath ())));
-                               if (c.extra_data ()) {
+                               dcp::Certificate c;
+                               string const extra = c.read_string (dcp::file_to_string (wx_to_std (d->GetPath ())));
+                               if (!extra.empty ()) {
                                        message_dialog (
                                                this,
                                                _("This file contains other certificates (or other data) after its first certificate. "