title: Add certificate to trusted does not work via macos "security add-trusted-cert"
body: <p>I have a safari web-page connecting to secured web socket server (written with C# netcore 3.0).
  I add server sertificate to trusted running this command (the same certificate I put on my websocket end point).</p>
  <pre><code>security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certificate.crt
  </code></pre>
  <p>Everything seems valid (I have a blue cross near my certificate in Keys application)
  but when I connect from safari (catalina os, mojave os) I get an error</p>
  <pre><code>OSStatus Error -9807. Invalid certificate chain
  </code></pre>
  <p>Also when I import certificate manually via Keys Application GUI there is no error. Everything works.</p>
  <ol>
  <li>Can anyone explain is there any difference between &quot;security add-trusted-cert&quot; import and GUI manual import?</li>
  <li>Maybe my add-trusted-cert command is wrong and I need some additional params?</li>
  </ol>