[openssl-users] SMIME -sign subcommand
Jakob Bohm
jb-openssl at wisemo.com
Thu Sep 7 12:43:29 UTC 2017
On 07/09/2017 14:02, Carlos Caraccia wrote:
> Hello, is there a way to debug or watch line by line which functions
> are executed when I run a this command:
>
> openssl smime -sign -signer certificadoWSASS.cer -inkey MiClave -out
> ticket.xml.cms -in Ticket.xml -outform PEM -nodetach
>
> I know there I can see the smile.c here
>
> <openssl src>/apps <https://github.com/openssl/openssl/tree/master/apps>
>
> I want to know how to compile if it is possible to compile it and to
> run it in Xcode and watch step by step the functions involved.
>
Get the source code from https://www.openssl.org/source/
Build it for your Mac using commands such as:
(Note these steps are based on a build script for OpenSSL 1.0.2k)
tar xzf openssl-1.something.tar.gz
cd openssl-1.something
CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
export CC
MACOSX_SDK=/Developer/SDKs/MacOSX10.12.sdk
[ -d ${MACOSX_SDK} ] ||
MACOSX_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
./Configure debug-darwin64-x86_64-cc --openssldir="$(pwd)-x86_64"
perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile
int intr_signal|' crypto/ui/ui_openssl.c
perl -i -pe "s|^CC= gcc|CC= ${CC} -arch x86_64
-mmacosx-version-min=10.6|g" Makefile
perl -i -pe "s|^CFLAG= |CFLAG= -arch x86_64 -mmacosx-version-min=10.6
-isysroot ${MACOSX_SDK} |g" Makefile
make MAKEDEPPROG=${CC} depend
make
make test
make install
Now debug the program in openssl-1.something-x86_64/bin/openssl
(Sorry, I don't know how to tell XCode to debug a program already
compiled with the XCode command line clang)
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
More information about the openssl-users
mailing list