Codesign returned unknown error -1=ffffffffffffffff : <p>I tried to code sign an iOS application,
These are the steps that i followed</p>

<pre><code>    security create-keychain -p password ${KEYCHAIN}
    security set-keychain-settings -u -t 300 ${KEYCHAIN}
    security list-keychains -d user -s login.keychain ${KEYCHAIN}
    security import "$1" -k ${KEYCHAIN} -A -P "${PASSPHRASE}" -A &gt;/dev/null
    security unlock-keychain -p password ${KEYCHAIN}

    /usr/bin/codesign -f -s $IDENTITY --keychain $KEYCHAIN --entitlements $ENTITLEMENTS Payload/Test.app
</code></pre>

<p>This returned me Codesign returned unknown error -1=ffffffffffffffff via ssh.</p>

<p>If i directly execute the code sign command in the machine, it's successfully signing.</p>

<p>The issue is only in Mac OS Sierra.</p>
