@@ -456,13 +456,13 @@ function unlockUIFig(hUIFig)
456
456
% - In Chromium, visit chrome://settings/certificates, click Authorities,
457
457
% then click import, and select your .pem.
458
458
% - In Firefox, visit about:preferences#privacy, click Certificates,
459
- % View Certificates, Authorities, then click Import and select your .pem.
459
+ % View Certificates, Authorities, then click Import and select your .pem.
460
460
SUCCESS_CODE = 0 ;
461
461
CL = connector .getCertificateLocation(); % certificate location;
462
462
if isempty(CL ), CL = fullfile(prefdir , ' thisMatlab.pem' ); end
463
463
%% Test if certificate is already accepted:
464
464
switch true
465
- case ispc
465
+ case ispc
466
466
[s ,c ] = system(' certutil -verifystore -user "Root" localhost' );
467
467
case isunix
468
468
[s ,c ] = system([' openssl crl2pkcs7 -nocrl -certfile ' ...
@@ -475,7 +475,9 @@ function unlockUIFig(hUIFig)
475
475
isAccepted = s == SUCCESS_CODE ;
476
476
477
477
%% Try to import certificate:
478
- if ~isAccepted
478
+ if isAccepted
479
+ wasImported = false ;
480
+ else
479
481
reply = questdlg(' Certificate not found. Would you like to import it?' ,...
480
482
' Import "localhost" certificate' ,' Yes' ,' No' ,' Yes' );
481
483
if strcmp(reply ,' Yes' ), switch true % #ok<ALIGN>
@@ -518,7 +520,7 @@ function unlockUIFig(hUIFig)
518
520
' > Import, and select your .pem.' ],...
519
521
[' - In Firefox, visit about:preferences#privacy, click Certificates > ' ,...
520
522
' View Certificates > Authorities > Import, and select your .pem.' ],...
521
- [' The certificate is found here: ' CL ]);
523
+ [' The certificate is found here: ' CL ]);
522
524
end
523
525
end % checkCert
524
526
end % unlockUIFig
0 commit comments