Typo: set i to -1 before goto.

PR#3302
Allow reordering of certificates when signing.

Add certificates if -nocerts and -certfile specified when signing
in smime application. This can be used this to specify the
order certificates appear in the PKCS#7 structure: some broken
applications require a certain ordering.

PR#3316