% installJmCertificate - install the certificate into the certificate store
% and return the alias used to identify it.

% Copyright 2014-2020 The MathWorks, Inc.

function certificateAlias = installJmCertificate(certificate)

certificateAlias = '';
if ~isempty( certificate )
    if exist( certificate, 'file' )
        certificate = java.io.File( certificate );
    end
    clientCertificateStore = com.mathworks.toolbox.distcomp.mjs.security.ClientCertificateStore.getInstance();
    certificateAlias = char( clientCertificateStore.putCertificate( certificate ) );
end
end
