summaryrefslogtreecommitdiff
path: root/main/openssl/crypto/pkcs7
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-02-13 15:53:13 +0100
committerArne Schwabe <arne@rfc2549.org>2014-02-13 15:53:13 +0100
commitdfd5ef42cf6b68bd7ee7b522ac3c9a55cd54c889 (patch)
tree39061cd184fac30537df44c379a4ecb18d119bc6 /main/openssl/crypto/pkcs7
parentb91aedc11393608ba7fb38f358c35ece662fd1b7 (diff)
Move to new gradle project structure (drop Eclipse support, add initial remote demo project)
--HG-- rename : build.gradle => main/build.gradle rename : jni/Android.mk => main/jni/Android.mk rename : jni/Application.mk => main/jni/Application.mk rename : jni/dummy.cpp => main/jni/dummy.cpp rename : jni/jbcrypto.cpp => main/jni/jbcrypto.cpp rename : jni/jniglue.c => main/jni/jniglue.c rename : jni/jniglue.h => main/jni/jniglue.h rename : jni/minivpn.c => main/jni/minivpn.c rename : lzo/AUTHORS => main/lzo/AUTHORS rename : lzo/Android.mk => main/lzo/Android.mk rename : lzo/B/00README.TXT => main/lzo/B/00README.TXT rename : lzo/B/clean.bat => main/lzo/B/clean.bat rename : lzo/B/done.bat => main/lzo/B/done.bat rename : lzo/B/dos16/bc.bat => main/lzo/B/dos16/bc.bat rename : lzo/B/dos16/bc.rsp => main/lzo/B/dos16/bc.rsp rename : lzo/B/dos16/bc_286.bat => main/lzo/B/dos16/bc_286.bat rename : lzo/B/dos16/bc_pp.bat => main/lzo/B/dos16/bc_pp.bat rename : lzo/B/dos16/dm.bat => main/lzo/B/dos16/dm.bat rename : lzo/B/dos16/mc.bat => main/lzo/B/dos16/mc.bat rename : lzo/B/dos16/mc_qc.bat => main/lzo/B/dos16/mc_qc.bat rename : lzo/B/dos16/qc.bat => main/lzo/B/dos16/qc.bat rename : lzo/B/dos16/sc.bat => main/lzo/B/dos16/sc.bat rename : lzo/B/dos16/tc.bat => main/lzo/B/dos16/tc.bat rename : lzo/B/dos16/vc.bat => main/lzo/B/dos16/vc.bat rename : lzo/B/dos16/vc_qc.bat => main/lzo/B/dos16/vc_qc.bat rename : lzo/B/dos16/wc.bat => main/lzo/B/dos16/wc.bat rename : lzo/B/dos16/wc.rsp => main/lzo/B/dos16/wc.rsp rename : lzo/B/dos32/bc_pp.bat => main/lzo/B/dos32/bc_pp.bat rename : lzo/B/dos32/dj2.bat => main/lzo/B/dos32/dj2.bat rename : lzo/B/dos32/dj2.opt => main/lzo/B/dos32/dj2.opt rename : lzo/B/dos32/dm.bat => main/lzo/B/dos32/dm.bat rename : lzo/B/dos32/emx.bat => main/lzo/B/dos32/emx.bat rename : lzo/B/dos32/highc.bat => main/lzo/B/dos32/highc.bat rename : lzo/B/dos32/highc.rsp => main/lzo/B/dos32/highc.rsp rename : lzo/B/dos32/ndp.bat => main/lzo/B/dos32/ndp.bat rename : lzo/B/dos32/ndp.rsp => main/lzo/B/dos32/ndp.rsp rename : lzo/B/dos32/sc.bat => main/lzo/B/dos32/sc.bat rename : lzo/B/dos32/wc.bat => main/lzo/B/dos32/wc.bat rename : lzo/B/dos32/zc.bat => main/lzo/B/dos32/zc.bat rename : lzo/B/generic/Makefile => main/lzo/B/generic/Makefile rename : lzo/B/generic/build.sh => main/lzo/B/generic/build.sh rename : lzo/B/generic/build_freestanding.sh => main/lzo/B/generic/build_freestanding.sh rename : lzo/B/generic/build_gcc.sh => main/lzo/B/generic/build_gcc.sh rename : lzo/B/generic/clean.sh => main/lzo/B/generic/clean.sh rename : lzo/B/os2/emx.bat => main/lzo/B/os2/emx.bat rename : lzo/B/os2/wc.bat => main/lzo/B/os2/wc.bat rename : lzo/B/os2/zc.bat => main/lzo/B/os2/zc.bat rename : lzo/B/os2_16/mc.bat => main/lzo/B/os2_16/mc.bat rename : lzo/B/os2_16/wc.bat => main/lzo/B/os2_16/wc.bat rename : lzo/B/prepare.bat => main/lzo/B/prepare.bat rename : lzo/B/src.rsp => main/lzo/B/src.rsp rename : lzo/B/unset.bat => main/lzo/B/unset.bat rename : lzo/B/win16/bc.bat => main/lzo/B/win16/bc.bat rename : lzo/B/win16/dm.bat => main/lzo/B/win16/dm.bat rename : lzo/B/win16/mc.bat => main/lzo/B/win16/mc.bat rename : lzo/B/win16/sc.bat => main/lzo/B/win16/sc.bat rename : lzo/B/win16/vc.bat => main/lzo/B/win16/vc.bat rename : lzo/B/win16/wc.bat => main/lzo/B/win16/wc.bat rename : lzo/B/win32/bc.bat => main/lzo/B/win32/bc.bat rename : lzo/B/win32/bc.rsp => main/lzo/B/win32/bc.rsp rename : lzo/B/win32/cygwin.bat => main/lzo/B/win32/cygwin.bat rename : lzo/B/win32/cygwin.rsp => main/lzo/B/win32/cygwin.rsp rename : lzo/B/win32/dm.bat => main/lzo/B/win32/dm.bat rename : lzo/B/win32/ic.bat => main/lzo/B/win32/ic.bat rename : lzo/B/win32/lccwin32.bat => main/lzo/B/win32/lccwin32.bat rename : lzo/B/win32/mingw.bat => main/lzo/B/win32/mingw.bat rename : lzo/B/win32/mwerks.bat => main/lzo/B/win32/mwerks.bat rename : lzo/B/win32/pellesc.bat => main/lzo/B/win32/pellesc.bat rename : lzo/B/win32/pgi.bat => main/lzo/B/win32/pgi.bat rename : lzo/B/win32/pw32.bat => main/lzo/B/win32/pw32.bat rename : lzo/B/win32/rsxnt.bat => main/lzo/B/win32/rsxnt.bat rename : lzo/B/win32/sc.bat => main/lzo/B/win32/sc.bat rename : lzo/B/win32/vc.bat => main/lzo/B/win32/vc.bat rename : lzo/B/win32/vc.rsp => main/lzo/B/win32/vc.rsp rename : lzo/B/win32/vc_dll.bat => main/lzo/B/win32/vc_dll.bat rename : lzo/B/win32/vc_dll.def => main/lzo/B/win32/vc_dll.def rename : lzo/B/win32/wc.bat => main/lzo/B/win32/wc.bat rename : lzo/B/win32/wc.rsp => main/lzo/B/win32/wc.rsp rename : lzo/B/win64/ic.bat => main/lzo/B/win64/ic.bat rename : lzo/B/win64/ic_dll.bat => main/lzo/B/win64/ic_dll.bat rename : lzo/B/win64/vc.bat => main/lzo/B/win64/vc.bat rename : lzo/B/win64/vc.rsp => main/lzo/B/win64/vc.rsp rename : lzo/B/win64/vc_dll.bat => main/lzo/B/win64/vc_dll.bat rename : lzo/B/win64/vc_dll.def => main/lzo/B/win64/vc_dll.def rename : lzo/BUGS => main/lzo/BUGS rename : lzo/COPYING => main/lzo/COPYING rename : lzo/ChangeLog => main/lzo/ChangeLog rename : lzo/INSTALL => main/lzo/INSTALL rename : lzo/Makefile => main/lzo/Makefile rename : lzo/Makefile.am => main/lzo/Makefile.am rename : lzo/Makefile.in => main/lzo/Makefile.in rename : lzo/NEWS => main/lzo/NEWS rename : lzo/README => main/lzo/README rename : lzo/README.ANDROID => main/lzo/README.ANDROID rename : lzo/THANKS => main/lzo/THANKS rename : lzo/aclocal.m4 => main/lzo/aclocal.m4 rename : lzo/asm/i386/00README.TXT => main/lzo/asm/i386/00README.TXT rename : lzo/asm/i386/obj/coff32/lzo1c_s1.o => main/lzo/asm/i386/obj/coff32/lzo1c_s1.o rename : lzo/asm/i386/obj/coff32/lzo1c_s2.o => main/lzo/asm/i386/obj/coff32/lzo1c_s2.o rename : lzo/asm/i386/obj/coff32/lzo1f_f1.o => main/lzo/asm/i386/obj/coff32/lzo1f_f1.o rename : lzo/asm/i386/obj/coff32/lzo1f_f2.o => main/lzo/asm/i386/obj/coff32/lzo1f_f2.o rename : lzo/asm/i386/obj/coff32/lzo1x_f1.o => main/lzo/asm/i386/obj/coff32/lzo1x_f1.o rename : lzo/asm/i386/obj/coff32/lzo1x_f2.o => main/lzo/asm/i386/obj/coff32/lzo1x_f2.o rename : lzo/asm/i386/obj/coff32/lzo1x_s1.o => main/lzo/asm/i386/obj/coff32/lzo1x_s1.o rename : lzo/asm/i386/obj/coff32/lzo1x_s2.o => main/lzo/asm/i386/obj/coff32/lzo1x_s2.o rename : lzo/asm/i386/obj/coff32/lzo1y_f1.o => main/lzo/asm/i386/obj/coff32/lzo1y_f1.o rename : lzo/asm/i386/obj/coff32/lzo1y_f2.o => main/lzo/asm/i386/obj/coff32/lzo1y_f2.o rename : lzo/asm/i386/obj/coff32/lzo1y_s1.o => main/lzo/asm/i386/obj/coff32/lzo1y_s1.o rename : lzo/asm/i386/obj/coff32/lzo1y_s2.o => main/lzo/asm/i386/obj/coff32/lzo1y_s2.o rename : lzo/asm/i386/obj/elf32/lzo1c_s1.o => main/lzo/asm/i386/obj/elf32/lzo1c_s1.o rename : lzo/asm/i386/obj/elf32/lzo1c_s2.o => main/lzo/asm/i386/obj/elf32/lzo1c_s2.o rename : lzo/asm/i386/obj/elf32/lzo1f_f1.o => main/lzo/asm/i386/obj/elf32/lzo1f_f1.o rename : lzo/asm/i386/obj/elf32/lzo1f_f2.o => main/lzo/asm/i386/obj/elf32/lzo1f_f2.o rename : lzo/asm/i386/obj/elf32/lzo1x_f1.o => main/lzo/asm/i386/obj/elf32/lzo1x_f1.o rename : lzo/asm/i386/obj/elf32/lzo1x_f2.o => main/lzo/asm/i386/obj/elf32/lzo1x_f2.o rename : lzo/asm/i386/obj/elf32/lzo1x_s1.o => main/lzo/asm/i386/obj/elf32/lzo1x_s1.o rename : lzo/asm/i386/obj/elf32/lzo1x_s2.o => main/lzo/asm/i386/obj/elf32/lzo1x_s2.o rename : lzo/asm/i386/obj/elf32/lzo1y_f1.o => main/lzo/asm/i386/obj/elf32/lzo1y_f1.o rename : lzo/asm/i386/obj/elf32/lzo1y_f2.o => main/lzo/asm/i386/obj/elf32/lzo1y_f2.o rename : lzo/asm/i386/obj/elf32/lzo1y_s1.o => main/lzo/asm/i386/obj/elf32/lzo1y_s1.o rename : lzo/asm/i386/obj/elf32/lzo1y_s2.o => main/lzo/asm/i386/obj/elf32/lzo1y_s2.o rename : lzo/asm/i386/obj/omf32/lzo1c_s1.obj => main/lzo/asm/i386/obj/omf32/lzo1c_s1.obj rename : lzo/asm/i386/obj/omf32/lzo1c_s2.obj => main/lzo/asm/i386/obj/omf32/lzo1c_s2.obj rename : lzo/asm/i386/obj/omf32/lzo1f_f1.obj => main/lzo/asm/i386/obj/omf32/lzo1f_f1.obj rename : lzo/asm/i386/obj/omf32/lzo1f_f2.obj => main/lzo/asm/i386/obj/omf32/lzo1f_f2.obj rename : lzo/asm/i386/obj/omf32/lzo1x_f1.obj => main/lzo/asm/i386/obj/omf32/lzo1x_f1.obj rename : lzo/asm/i386/obj/omf32/lzo1x_f2.obj => main/lzo/asm/i386/obj/omf32/lzo1x_f2.obj rename : lzo/asm/i386/obj/omf32/lzo1x_s1.obj => main/lzo/asm/i386/obj/omf32/lzo1x_s1.obj rename : lzo/asm/i386/obj/omf32/lzo1x_s2.obj => main/lzo/asm/i386/obj/omf32/lzo1x_s2.obj rename : lzo/asm/i386/obj/omf32/lzo1y_f1.obj => main/lzo/asm/i386/obj/omf32/lzo1y_f1.obj rename : lzo/asm/i386/obj/omf32/lzo1y_f2.obj => main/lzo/asm/i386/obj/omf32/lzo1y_f2.obj rename : lzo/asm/i386/obj/omf32/lzo1y_s1.obj => main/lzo/asm/i386/obj/omf32/lzo1y_s1.obj rename : lzo/asm/i386/obj/omf32/lzo1y_s2.obj => main/lzo/asm/i386/obj/omf32/lzo1y_s2.obj rename : lzo/asm/i386/obj/win32/lzo1c_s1.obj => main/lzo/asm/i386/obj/win32/lzo1c_s1.obj rename : lzo/asm/i386/obj/win32/lzo1c_s2.obj => main/lzo/asm/i386/obj/win32/lzo1c_s2.obj rename : lzo/asm/i386/obj/win32/lzo1f_f1.obj => main/lzo/asm/i386/obj/win32/lzo1f_f1.obj rename : lzo/asm/i386/obj/win32/lzo1f_f2.obj => main/lzo/asm/i386/obj/win32/lzo1f_f2.obj rename : lzo/asm/i386/obj/win32/lzo1x_f1.obj => main/lzo/asm/i386/obj/win32/lzo1x_f1.obj rename : lzo/asm/i386/obj/win32/lzo1x_f2.obj => main/lzo/asm/i386/obj/win32/lzo1x_f2.obj rename : lzo/asm/i386/obj/win32/lzo1x_s1.obj => main/lzo/asm/i386/obj/win32/lzo1x_s1.obj rename : lzo/asm/i386/obj/win32/lzo1x_s2.obj => main/lzo/asm/i386/obj/win32/lzo1x_s2.obj rename : lzo/asm/i386/obj/win32/lzo1y_f1.obj => main/lzo/asm/i386/obj/win32/lzo1y_f1.obj rename : lzo/asm/i386/obj/win32/lzo1y_f2.obj => main/lzo/asm/i386/obj/win32/lzo1y_f2.obj rename : lzo/asm/i386/obj/win32/lzo1y_s1.obj => main/lzo/asm/i386/obj/win32/lzo1y_s1.obj rename : lzo/asm/i386/obj/win32/lzo1y_s2.obj => main/lzo/asm/i386/obj/win32/lzo1y_s2.obj rename : lzo/asm/i386/src/enter.ash => main/lzo/asm/i386/src/enter.ash rename : lzo/asm/i386/src/leave.ash => main/lzo/asm/i386/src/leave.ash rename : lzo/asm/i386/src/lzo1c_d.ash => main/lzo/asm/i386/src/lzo1c_d.ash rename : lzo/asm/i386/src/lzo1c_s1.S => main/lzo/asm/i386/src/lzo1c_s1.S rename : lzo/asm/i386/src/lzo1c_s2.S => main/lzo/asm/i386/src/lzo1c_s2.S rename : lzo/asm/i386/src/lzo1f_d.ash => main/lzo/asm/i386/src/lzo1f_d.ash rename : lzo/asm/i386/src/lzo1f_f1.S => main/lzo/asm/i386/src/lzo1f_f1.S rename : lzo/asm/i386/src/lzo1f_f2.S => main/lzo/asm/i386/src/lzo1f_f2.S rename : lzo/asm/i386/src/lzo1x_d.ash => main/lzo/asm/i386/src/lzo1x_d.ash rename : lzo/asm/i386/src/lzo1x_f1.S => main/lzo/asm/i386/src/lzo1x_f1.S rename : lzo/asm/i386/src/lzo1x_f2.S => main/lzo/asm/i386/src/lzo1x_f2.S rename : lzo/asm/i386/src/lzo1x_s1.S => main/lzo/asm/i386/src/lzo1x_s1.S rename : lzo/asm/i386/src/lzo1x_s2.S => main/lzo/asm/i386/src/lzo1x_s2.S rename : lzo/asm/i386/src/lzo1y_f1.S => main/lzo/asm/i386/src/lzo1y_f1.S rename : lzo/asm/i386/src/lzo1y_f2.S => main/lzo/asm/i386/src/lzo1y_f2.S rename : lzo/asm/i386/src/lzo1y_s1.S => main/lzo/asm/i386/src/lzo1y_s1.S rename : lzo/asm/i386/src/lzo1y_s2.S => main/lzo/asm/i386/src/lzo1y_s2.S rename : lzo/asm/i386/src/lzo_asm.h => main/lzo/asm/i386/src/lzo_asm.h rename : lzo/asm/i386/src_gas/all/asm_all.S => main/lzo/asm/i386/src_gas/all/asm_all.S rename : lzo/asm/i386/src_gas/asminit.def => main/lzo/asm/i386/src_gas/asminit.def rename : lzo/asm/i386/src_gas/lzo1c_s1.S => main/lzo/asm/i386/src_gas/lzo1c_s1.S rename : lzo/asm/i386/src_gas/lzo1c_s2.S => main/lzo/asm/i386/src_gas/lzo1c_s2.S rename : lzo/asm/i386/src_gas/lzo1f_f1.S => main/lzo/asm/i386/src_gas/lzo1f_f1.S rename : lzo/asm/i386/src_gas/lzo1f_f2.S => main/lzo/asm/i386/src_gas/lzo1f_f2.S rename : lzo/asm/i386/src_gas/lzo1x_f1.S => main/lzo/asm/i386/src_gas/lzo1x_f1.S rename : lzo/asm/i386/src_gas/lzo1x_f2.S => main/lzo/asm/i386/src_gas/lzo1x_f2.S rename : lzo/asm/i386/src_gas/lzo1x_s1.S => main/lzo/asm/i386/src_gas/lzo1x_s1.S rename : lzo/asm/i386/src_gas/lzo1x_s2.S => main/lzo/asm/i386/src_gas/lzo1x_s2.S rename : lzo/asm/i386/src_gas/lzo1y_f1.S => main/lzo/asm/i386/src_gas/lzo1y_f1.S rename : lzo/asm/i386/src_gas/lzo1y_f2.S => main/lzo/asm/i386/src_gas/lzo1y_f2.S rename : lzo/asm/i386/src_gas/lzo1y_s1.S => main/lzo/asm/i386/src_gas/lzo1y_s1.S rename : lzo/asm/i386/src_gas/lzo1y_s2.S => main/lzo/asm/i386/src_gas/lzo1y_s2.S rename : lzo/asm/i386/src_masm/all/asm_all.asm => main/lzo/asm/i386/src_masm/all/asm_all.asm rename : lzo/asm/i386/src_masm/asminit.def => main/lzo/asm/i386/src_masm/asminit.def rename : lzo/asm/i386/src_masm/lzo1c_s1.asm => main/lzo/asm/i386/src_masm/lzo1c_s1.asm rename : lzo/asm/i386/src_masm/lzo1c_s2.asm => main/lzo/asm/i386/src_masm/lzo1c_s2.asm rename : lzo/asm/i386/src_masm/lzo1f_f1.asm => main/lzo/asm/i386/src_masm/lzo1f_f1.asm rename : lzo/asm/i386/src_masm/lzo1f_f2.asm => main/lzo/asm/i386/src_masm/lzo1f_f2.asm rename : lzo/asm/i386/src_masm/lzo1x_f1.asm => main/lzo/asm/i386/src_masm/lzo1x_f1.asm rename : lzo/asm/i386/src_masm/lzo1x_f2.asm => main/lzo/asm/i386/src_masm/lzo1x_f2.asm rename : lzo/asm/i386/src_masm/lzo1x_s1.asm => main/lzo/asm/i386/src_masm/lzo1x_s1.asm rename : lzo/asm/i386/src_masm/lzo1x_s2.asm => main/lzo/asm/i386/src_masm/lzo1x_s2.asm rename : lzo/asm/i386/src_masm/lzo1y_f1.asm => main/lzo/asm/i386/src_masm/lzo1y_f1.asm rename : lzo/asm/i386/src_masm/lzo1y_f2.asm => main/lzo/asm/i386/src_masm/lzo1y_f2.asm rename : lzo/asm/i386/src_masm/lzo1y_s1.asm => main/lzo/asm/i386/src_masm/lzo1y_s1.asm rename : lzo/asm/i386/src_masm/lzo1y_s2.asm => main/lzo/asm/i386/src_masm/lzo1y_s2.asm rename : lzo/asm/i386/src_nasm/all/asm_all.asm => main/lzo/asm/i386/src_nasm/all/asm_all.asm rename : lzo/asm/i386/src_nasm/asminit.def => main/lzo/asm/i386/src_nasm/asminit.def rename : lzo/asm/i386/src_nasm/lzo1c_s1.asm => main/lzo/asm/i386/src_nasm/lzo1c_s1.asm rename : lzo/asm/i386/src_nasm/lzo1c_s2.asm => main/lzo/asm/i386/src_nasm/lzo1c_s2.asm rename : lzo/asm/i386/src_nasm/lzo1f_f1.asm => main/lzo/asm/i386/src_nasm/lzo1f_f1.asm rename : lzo/asm/i386/src_nasm/lzo1f_f2.asm => main/lzo/asm/i386/src_nasm/lzo1f_f2.asm rename : lzo/asm/i386/src_nasm/lzo1x_f1.asm => main/lzo/asm/i386/src_nasm/lzo1x_f1.asm rename : lzo/asm/i386/src_nasm/lzo1x_f2.asm => main/lzo/asm/i386/src_nasm/lzo1x_f2.asm rename : lzo/asm/i386/src_nasm/lzo1x_s1.asm => main/lzo/asm/i386/src_nasm/lzo1x_s1.asm rename : lzo/asm/i386/src_nasm/lzo1x_s2.asm => main/lzo/asm/i386/src_nasm/lzo1x_s2.asm rename : lzo/asm/i386/src_nasm/lzo1y_f1.asm => main/lzo/asm/i386/src_nasm/lzo1y_f1.asm rename : lzo/asm/i386/src_nasm/lzo1y_f2.asm => main/lzo/asm/i386/src_nasm/lzo1y_f2.asm rename : lzo/asm/i386/src_nasm/lzo1y_s1.asm => main/lzo/asm/i386/src_nasm/lzo1y_s1.asm rename : lzo/asm/i386/src_nasm/lzo1y_s2.asm => main/lzo/asm/i386/src_nasm/lzo1y_s2.asm rename : lzo/autoconf/compile => main/lzo/autoconf/compile rename : lzo/autoconf/config.guess => main/lzo/autoconf/config.guess rename : lzo/autoconf/config.rpath => main/lzo/autoconf/config.rpath rename : lzo/autoconf/config.sub => main/lzo/autoconf/config.sub rename : lzo/autoconf/depcomp => main/lzo/autoconf/depcomp rename : lzo/autoconf/install-sh => main/lzo/autoconf/install-sh rename : lzo/autoconf/local.m4 => main/lzo/autoconf/local.m4 rename : lzo/autoconf/ltmain.sh => main/lzo/autoconf/ltmain.sh rename : lzo/autoconf/mdate-sh => main/lzo/autoconf/mdate-sh rename : lzo/autoconf/missing => main/lzo/autoconf/missing rename : lzo/autoconf/mkinstalldirs => main/lzo/autoconf/mkinstalldirs rename : lzo/autoconf/py-compile => main/lzo/autoconf/py-compile rename : lzo/autoconf/shtool => main/lzo/autoconf/shtool rename : lzo/autoconf/ylwrap => main/lzo/autoconf/ylwrap rename : lzo/config.h => main/lzo/config.h rename : lzo/config.hin => main/lzo/config.hin rename : lzo/config.log => main/lzo/config.log rename : lzo/config.status => main/lzo/config.status rename : lzo/configure => main/lzo/configure rename : lzo/configure.ac => main/lzo/configure.ac rename : lzo/doc/LZO.FAQ => main/lzo/doc/LZO.FAQ rename : lzo/doc/LZO.TXT => main/lzo/doc/LZO.TXT rename : lzo/doc/LZOAPI.TXT => main/lzo/doc/LZOAPI.TXT rename : lzo/doc/LZOTEST.TXT => main/lzo/doc/LZOTEST.TXT rename : lzo/examples/.deps/dict.Po => main/lzo/examples/.deps/dict.Po rename : lzo/examples/.deps/lzopack.Po => main/lzo/examples/.deps/lzopack.Po rename : lzo/examples/.deps/overlap.Po => main/lzo/examples/.deps/overlap.Po rename : lzo/examples/.deps/precomp.Po => main/lzo/examples/.deps/precomp.Po rename : lzo/examples/.deps/precomp2.Po => main/lzo/examples/.deps/precomp2.Po rename : lzo/examples/.deps/simple.Po => main/lzo/examples/.deps/simple.Po rename : lzo/examples/Makefile => main/lzo/examples/Makefile rename : lzo/examples/Makefile.am => main/lzo/examples/Makefile.am rename : lzo/examples/Makefile.in => main/lzo/examples/Makefile.in rename : lzo/examples/dict.c => main/lzo/examples/dict.c rename : lzo/examples/lzopack.c => main/lzo/examples/lzopack.c rename : lzo/examples/overlap.c => main/lzo/examples/overlap.c rename : lzo/examples/portab.h => main/lzo/examples/portab.h rename : lzo/examples/portab_a.h => main/lzo/examples/portab_a.h rename : lzo/examples/precomp.c => main/lzo/examples/precomp.c rename : lzo/examples/precomp2.c => main/lzo/examples/precomp2.c rename : lzo/examples/simple.c => main/lzo/examples/simple.c rename : lzo/include/Makefile => main/lzo/include/Makefile rename : lzo/include/Makefile.am => main/lzo/include/Makefile.am rename : lzo/include/Makefile.in => main/lzo/include/Makefile.in rename : lzo/include/lzo/Makefile => main/lzo/include/lzo/Makefile rename : lzo/include/lzo/Makefile.am => main/lzo/include/lzo/Makefile.am rename : lzo/include/lzo/Makefile.in => main/lzo/include/lzo/Makefile.in rename : lzo/include/lzo/lzo1.h => main/lzo/include/lzo/lzo1.h rename : lzo/include/lzo/lzo1a.h => main/lzo/include/lzo/lzo1a.h rename : lzo/include/lzo/lzo1b.h => main/lzo/include/lzo/lzo1b.h rename : lzo/include/lzo/lzo1c.h => main/lzo/include/lzo/lzo1c.h rename : lzo/include/lzo/lzo1f.h => main/lzo/include/lzo/lzo1f.h rename : lzo/include/lzo/lzo1x.h => main/lzo/include/lzo/lzo1x.h rename : lzo/include/lzo/lzo1y.h => main/lzo/include/lzo/lzo1y.h rename : lzo/include/lzo/lzo1z.h => main/lzo/include/lzo/lzo1z.h rename : lzo/include/lzo/lzo2a.h => main/lzo/include/lzo/lzo2a.h rename : lzo/include/lzo/lzo_asm.h => main/lzo/include/lzo/lzo_asm.h rename : lzo/include/lzo/lzoconf.h => main/lzo/include/lzo/lzoconf.h rename : lzo/include/lzo/lzodefs.h => main/lzo/include/lzo/lzodefs.h rename : lzo/include/lzo/lzoutil.h => main/lzo/include/lzo/lzoutil.h rename : lzo/libtool => main/lzo/libtool rename : lzo/lzotest/.deps/lzotest.Po => main/lzo/lzotest/.deps/lzotest.Po rename : lzo/lzotest/Makefile => main/lzo/lzotest/Makefile rename : lzo/lzotest/Makefile.am => main/lzo/lzotest/Makefile.am rename : lzo/lzotest/Makefile.in => main/lzo/lzotest/Makefile.in rename : lzo/lzotest/asm.h => main/lzo/lzotest/asm.h rename : lzo/lzotest/db.h => main/lzo/lzotest/db.h rename : lzo/lzotest/lzotest.c => main/lzo/lzotest/lzotest.c rename : lzo/lzotest/mygetopt.ch => main/lzo/lzotest/mygetopt.ch rename : lzo/lzotest/mygetopt.h => main/lzo/lzotest/mygetopt.h rename : lzo/lzotest/wrap.h => main/lzo/lzotest/wrap.h rename : lzo/lzotest/wrapmisc.h => main/lzo/lzotest/wrapmisc.h rename : lzo/minilzo/.deps/minilzo.Po => main/lzo/minilzo/.deps/minilzo.Po rename : lzo/minilzo/.deps/testmini.Po => main/lzo/minilzo/.deps/testmini.Po rename : lzo/minilzo/Makefile => main/lzo/minilzo/Makefile rename : lzo/minilzo/Makefile.am => main/lzo/minilzo/Makefile.am rename : lzo/minilzo/Makefile.in => main/lzo/minilzo/Makefile.in rename : lzo/minilzo/Makefile.minilzo => main/lzo/minilzo/Makefile.minilzo rename : lzo/minilzo/README.LZO => main/lzo/minilzo/README.LZO rename : lzo/minilzo/minilzo.c => main/lzo/minilzo/minilzo.c rename : lzo/minilzo/minilzo.h => main/lzo/minilzo/minilzo.h rename : lzo/minilzo/testmini.c => main/lzo/minilzo/testmini.c rename : lzo/src/.deps/lzo1.Plo => main/lzo/src/.deps/lzo1.Plo rename : lzo/src/.deps/lzo1_99.Plo => main/lzo/src/.deps/lzo1_99.Plo rename : lzo/src/.deps/lzo1a.Plo => main/lzo/src/.deps/lzo1a.Plo rename : lzo/src/.deps/lzo1a_99.Plo => main/lzo/src/.deps/lzo1a_99.Plo rename : lzo/src/.deps/lzo1b_1.Plo => main/lzo/src/.deps/lzo1b_1.Plo rename : lzo/src/.deps/lzo1b_2.Plo => main/lzo/src/.deps/lzo1b_2.Plo rename : lzo/src/.deps/lzo1b_3.Plo => main/lzo/src/.deps/lzo1b_3.Plo rename : lzo/src/.deps/lzo1b_4.Plo => main/lzo/src/.deps/lzo1b_4.Plo rename : lzo/src/.deps/lzo1b_5.Plo => main/lzo/src/.deps/lzo1b_5.Plo rename : lzo/src/.deps/lzo1b_6.Plo => main/lzo/src/.deps/lzo1b_6.Plo rename : lzo/src/.deps/lzo1b_7.Plo => main/lzo/src/.deps/lzo1b_7.Plo rename : lzo/src/.deps/lzo1b_8.Plo => main/lzo/src/.deps/lzo1b_8.Plo rename : lzo/src/.deps/lzo1b_9.Plo => main/lzo/src/.deps/lzo1b_9.Plo rename : lzo/src/.deps/lzo1b_99.Plo => main/lzo/src/.deps/lzo1b_99.Plo rename : lzo/src/.deps/lzo1b_9x.Plo => main/lzo/src/.deps/lzo1b_9x.Plo rename : lzo/src/.deps/lzo1b_cc.Plo => main/lzo/src/.deps/lzo1b_cc.Plo rename : lzo/src/.deps/lzo1b_d1.Plo => main/lzo/src/.deps/lzo1b_d1.Plo rename : lzo/src/.deps/lzo1b_d2.Plo => main/lzo/src/.deps/lzo1b_d2.Plo rename : lzo/src/.deps/lzo1b_rr.Plo => main/lzo/src/.deps/lzo1b_rr.Plo rename : lzo/src/.deps/lzo1b_xx.Plo => main/lzo/src/.deps/lzo1b_xx.Plo rename : lzo/src/.deps/lzo1c_1.Plo => main/lzo/src/.deps/lzo1c_1.Plo rename : lzo/src/.deps/lzo1c_2.Plo => main/lzo/src/.deps/lzo1c_2.Plo rename : lzo/src/.deps/lzo1c_3.Plo => main/lzo/src/.deps/lzo1c_3.Plo rename : lzo/src/.deps/lzo1c_4.Plo => main/lzo/src/.deps/lzo1c_4.Plo rename : lzo/src/.deps/lzo1c_5.Plo => main/lzo/src/.deps/lzo1c_5.Plo rename : lzo/src/.deps/lzo1c_6.Plo => main/lzo/src/.deps/lzo1c_6.Plo rename : lzo/src/.deps/lzo1c_7.Plo => main/lzo/src/.deps/lzo1c_7.Plo rename : lzo/src/.deps/lzo1c_8.Plo => main/lzo/src/.deps/lzo1c_8.Plo rename : lzo/src/.deps/lzo1c_9.Plo => main/lzo/src/.deps/lzo1c_9.Plo rename : lzo/src/.deps/lzo1c_99.Plo => main/lzo/src/.deps/lzo1c_99.Plo rename : lzo/src/.deps/lzo1c_9x.Plo => main/lzo/src/.deps/lzo1c_9x.Plo rename : lzo/src/.deps/lzo1c_cc.Plo => main/lzo/src/.deps/lzo1c_cc.Plo rename : lzo/src/.deps/lzo1c_d1.Plo => main/lzo/src/.deps/lzo1c_d1.Plo rename : lzo/src/.deps/lzo1c_d2.Plo => main/lzo/src/.deps/lzo1c_d2.Plo rename : lzo/src/.deps/lzo1c_rr.Plo => main/lzo/src/.deps/lzo1c_rr.Plo rename : lzo/src/.deps/lzo1c_xx.Plo => main/lzo/src/.deps/lzo1c_xx.Plo rename : lzo/src/.deps/lzo1f_1.Plo => main/lzo/src/.deps/lzo1f_1.Plo rename : lzo/src/.deps/lzo1f_9x.Plo => main/lzo/src/.deps/lzo1f_9x.Plo rename : lzo/src/.deps/lzo1f_d1.Plo => main/lzo/src/.deps/lzo1f_d1.Plo rename : lzo/src/.deps/lzo1f_d2.Plo => main/lzo/src/.deps/lzo1f_d2.Plo rename : lzo/src/.deps/lzo1x_1.Plo => main/lzo/src/.deps/lzo1x_1.Plo rename : lzo/src/.deps/lzo1x_1k.Plo => main/lzo/src/.deps/lzo1x_1k.Plo rename : lzo/src/.deps/lzo1x_1l.Plo => main/lzo/src/.deps/lzo1x_1l.Plo rename : lzo/src/.deps/lzo1x_1o.Plo => main/lzo/src/.deps/lzo1x_1o.Plo rename : lzo/src/.deps/lzo1x_9x.Plo => main/lzo/src/.deps/lzo1x_9x.Plo rename : lzo/src/.deps/lzo1x_d1.Plo => main/lzo/src/.deps/lzo1x_d1.Plo rename : lzo/src/.deps/lzo1x_d2.Plo => main/lzo/src/.deps/lzo1x_d2.Plo rename : lzo/src/.deps/lzo1x_d3.Plo => main/lzo/src/.deps/lzo1x_d3.Plo rename : lzo/src/.deps/lzo1x_o.Plo => main/lzo/src/.deps/lzo1x_o.Plo rename : lzo/src/.deps/lzo1y_1.Plo => main/lzo/src/.deps/lzo1y_1.Plo rename : lzo/src/.deps/lzo1y_9x.Plo => main/lzo/src/.deps/lzo1y_9x.Plo rename : lzo/src/.deps/lzo1y_d1.Plo => main/lzo/src/.deps/lzo1y_d1.Plo rename : lzo/src/.deps/lzo1y_d2.Plo => main/lzo/src/.deps/lzo1y_d2.Plo rename : lzo/src/.deps/lzo1y_d3.Plo => main/lzo/src/.deps/lzo1y_d3.Plo rename : lzo/src/.deps/lzo1y_o.Plo => main/lzo/src/.deps/lzo1y_o.Plo rename : lzo/src/.deps/lzo1z_9x.Plo => main/lzo/src/.deps/lzo1z_9x.Plo rename : lzo/src/.deps/lzo1z_d1.Plo => main/lzo/src/.deps/lzo1z_d1.Plo rename : lzo/src/.deps/lzo1z_d2.Plo => main/lzo/src/.deps/lzo1z_d2.Plo rename : lzo/src/.deps/lzo1z_d3.Plo => main/lzo/src/.deps/lzo1z_d3.Plo rename : lzo/src/.deps/lzo2a_9x.Plo => main/lzo/src/.deps/lzo2a_9x.Plo rename : lzo/src/.deps/lzo2a_d1.Plo => main/lzo/src/.deps/lzo2a_d1.Plo rename : lzo/src/.deps/lzo2a_d2.Plo => main/lzo/src/.deps/lzo2a_d2.Plo rename : lzo/src/.deps/lzo_crc.Plo => main/lzo/src/.deps/lzo_crc.Plo rename : lzo/src/.deps/lzo_init.Plo => main/lzo/src/.deps/lzo_init.Plo rename : lzo/src/.deps/lzo_ptr.Plo => main/lzo/src/.deps/lzo_ptr.Plo rename : lzo/src/.deps/lzo_str.Plo => main/lzo/src/.deps/lzo_str.Plo rename : lzo/src/.deps/lzo_util.Plo => main/lzo/src/.deps/lzo_util.Plo rename : lzo/src/Makefile => main/lzo/src/Makefile rename : lzo/src/Makefile.am => main/lzo/src/Makefile.am rename : lzo/src/Makefile.in => main/lzo/src/Makefile.in rename : lzo/src/compr1b.h => main/lzo/src/compr1b.h rename : lzo/src/compr1c.h => main/lzo/src/compr1c.h rename : lzo/src/config1.h => main/lzo/src/config1.h rename : lzo/src/config1a.h => main/lzo/src/config1a.h rename : lzo/src/config1b.h => main/lzo/src/config1b.h rename : lzo/src/config1c.h => main/lzo/src/config1c.h rename : lzo/src/config1f.h => main/lzo/src/config1f.h rename : lzo/src/config1x.h => main/lzo/src/config1x.h rename : lzo/src/config1y.h => main/lzo/src/config1y.h rename : lzo/src/config1z.h => main/lzo/src/config1z.h rename : lzo/src/config2a.h => main/lzo/src/config2a.h rename : lzo/src/lzo1.c => main/lzo/src/lzo1.c rename : lzo/src/lzo1_99.c => main/lzo/src/lzo1_99.c rename : lzo/src/lzo1_cm.ch => main/lzo/src/lzo1_cm.ch rename : lzo/src/lzo1_d.ch => main/lzo/src/lzo1_d.ch rename : lzo/src/lzo1a.c => main/lzo/src/lzo1a.c rename : lzo/src/lzo1a_99.c => main/lzo/src/lzo1a_99.c rename : lzo/src/lzo1a_cm.ch => main/lzo/src/lzo1a_cm.ch rename : lzo/src/lzo1a_cr.ch => main/lzo/src/lzo1a_cr.ch rename : lzo/src/lzo1a_de.h => main/lzo/src/lzo1a_de.h rename : lzo/src/lzo1b_1.c => main/lzo/src/lzo1b_1.c rename : lzo/src/lzo1b_2.c => main/lzo/src/lzo1b_2.c rename : lzo/src/lzo1b_3.c => main/lzo/src/lzo1b_3.c rename : lzo/src/lzo1b_4.c => main/lzo/src/lzo1b_4.c rename : lzo/src/lzo1b_5.c => main/lzo/src/lzo1b_5.c rename : lzo/src/lzo1b_6.c => main/lzo/src/lzo1b_6.c rename : lzo/src/lzo1b_7.c => main/lzo/src/lzo1b_7.c rename : lzo/src/lzo1b_8.c => main/lzo/src/lzo1b_8.c rename : lzo/src/lzo1b_9.c => main/lzo/src/lzo1b_9.c rename : lzo/src/lzo1b_99.c => main/lzo/src/lzo1b_99.c rename : lzo/src/lzo1b_9x.c => main/lzo/src/lzo1b_9x.c rename : lzo/src/lzo1b_c.ch => main/lzo/src/lzo1b_c.ch rename : lzo/src/lzo1b_cc.c => main/lzo/src/lzo1b_cc.c rename : lzo/src/lzo1b_cc.h => main/lzo/src/lzo1b_cc.h rename : lzo/src/lzo1b_cm.ch => main/lzo/src/lzo1b_cm.ch rename : lzo/src/lzo1b_cr.ch => main/lzo/src/lzo1b_cr.ch rename : lzo/src/lzo1b_d.ch => main/lzo/src/lzo1b_d.ch rename : lzo/src/lzo1b_d1.c => main/lzo/src/lzo1b_d1.c rename : lzo/src/lzo1b_d2.c => main/lzo/src/lzo1b_d2.c rename : lzo/src/lzo1b_de.h => main/lzo/src/lzo1b_de.h rename : lzo/src/lzo1b_r.ch => main/lzo/src/lzo1b_r.ch rename : lzo/src/lzo1b_rr.c => main/lzo/src/lzo1b_rr.c rename : lzo/src/lzo1b_sm.ch => main/lzo/src/lzo1b_sm.ch rename : lzo/src/lzo1b_tm.ch => main/lzo/src/lzo1b_tm.ch rename : lzo/src/lzo1b_xx.c => main/lzo/src/lzo1b_xx.c rename : lzo/src/lzo1c_1.c => main/lzo/src/lzo1c_1.c rename : lzo/src/lzo1c_2.c => main/lzo/src/lzo1c_2.c rename : lzo/src/lzo1c_3.c => main/lzo/src/lzo1c_3.c rename : lzo/src/lzo1c_4.c => main/lzo/src/lzo1c_4.c rename : lzo/src/lzo1c_5.c => main/lzo/src/lzo1c_5.c rename : lzo/src/lzo1c_6.c => main/lzo/src/lzo1c_6.c rename : lzo/src/lzo1c_7.c => main/lzo/src/lzo1c_7.c rename : lzo/src/lzo1c_8.c => main/lzo/src/lzo1c_8.c rename : lzo/src/lzo1c_9.c => main/lzo/src/lzo1c_9.c rename : lzo/src/lzo1c_99.c => main/lzo/src/lzo1c_99.c rename : lzo/src/lzo1c_9x.c => main/lzo/src/lzo1c_9x.c rename : lzo/src/lzo1c_cc.c => main/lzo/src/lzo1c_cc.c rename : lzo/src/lzo1c_cc.h => main/lzo/src/lzo1c_cc.h rename : lzo/src/lzo1c_d1.c => main/lzo/src/lzo1c_d1.c rename : lzo/src/lzo1c_d2.c => main/lzo/src/lzo1c_d2.c rename : lzo/src/lzo1c_rr.c => main/lzo/src/lzo1c_rr.c rename : lzo/src/lzo1c_xx.c => main/lzo/src/lzo1c_xx.c rename : lzo/src/lzo1f_1.c => main/lzo/src/lzo1f_1.c rename : lzo/src/lzo1f_9x.c => main/lzo/src/lzo1f_9x.c rename : lzo/src/lzo1f_d.ch => main/lzo/src/lzo1f_d.ch rename : lzo/src/lzo1f_d1.c => main/lzo/src/lzo1f_d1.c rename : lzo/src/lzo1f_d2.c => main/lzo/src/lzo1f_d2.c rename : lzo/src/lzo1x_1.c => main/lzo/src/lzo1x_1.c rename : lzo/src/lzo1x_1k.c => main/lzo/src/lzo1x_1k.c rename : lzo/src/lzo1x_1l.c => main/lzo/src/lzo1x_1l.c rename : lzo/src/lzo1x_1o.c => main/lzo/src/lzo1x_1o.c rename : lzo/src/lzo1x_9x.c => main/lzo/src/lzo1x_9x.c rename : lzo/src/lzo1x_c.ch => main/lzo/src/lzo1x_c.ch rename : lzo/src/lzo1x_d.ch => main/lzo/src/lzo1x_d.ch rename : lzo/src/lzo1x_d1.c => main/lzo/src/lzo1x_d1.c rename : lzo/src/lzo1x_d2.c => main/lzo/src/lzo1x_d2.c rename : lzo/src/lzo1x_d3.c => main/lzo/src/lzo1x_d3.c rename : lzo/src/lzo1x_o.c => main/lzo/src/lzo1x_o.c rename : lzo/src/lzo1x_oo.ch => main/lzo/src/lzo1x_oo.ch rename : lzo/src/lzo1y_1.c => main/lzo/src/lzo1y_1.c rename : lzo/src/lzo1y_9x.c => main/lzo/src/lzo1y_9x.c rename : lzo/src/lzo1y_d1.c => main/lzo/src/lzo1y_d1.c rename : lzo/src/lzo1y_d2.c => main/lzo/src/lzo1y_d2.c rename : lzo/src/lzo1y_d3.c => main/lzo/src/lzo1y_d3.c rename : lzo/src/lzo1y_o.c => main/lzo/src/lzo1y_o.c rename : lzo/src/lzo1z_9x.c => main/lzo/src/lzo1z_9x.c rename : lzo/src/lzo1z_d1.c => main/lzo/src/lzo1z_d1.c rename : lzo/src/lzo1z_d2.c => main/lzo/src/lzo1z_d2.c rename : lzo/src/lzo1z_d3.c => main/lzo/src/lzo1z_d3.c rename : lzo/src/lzo2a_9x.c => main/lzo/src/lzo2a_9x.c rename : lzo/src/lzo2a_d.ch => main/lzo/src/lzo2a_d.ch rename : lzo/src/lzo2a_d1.c => main/lzo/src/lzo2a_d1.c rename : lzo/src/lzo2a_d2.c => main/lzo/src/lzo2a_d2.c rename : lzo/src/lzo_conf.h => main/lzo/src/lzo_conf.h rename : lzo/src/lzo_crc.c => main/lzo/src/lzo_crc.c rename : lzo/src/lzo_dict.h => main/lzo/src/lzo_dict.h rename : lzo/src/lzo_dll.ch => main/lzo/src/lzo_dll.ch rename : lzo/src/lzo_func.ch => main/lzo/src/lzo_func.ch rename : lzo/src/lzo_init.c => main/lzo/src/lzo_init.c rename : lzo/src/lzo_mchw.ch => main/lzo/src/lzo_mchw.ch rename : lzo/src/lzo_ptr.c => main/lzo/src/lzo_ptr.c rename : lzo/src/lzo_ptr.h => main/lzo/src/lzo_ptr.h rename : lzo/src/lzo_str.c => main/lzo/src/lzo_str.c rename : lzo/src/lzo_swd.ch => main/lzo/src/lzo_swd.ch rename : lzo/src/lzo_util.c => main/lzo/src/lzo_util.c rename : lzo/src/miniacc.h => main/lzo/src/miniacc.h rename : lzo/src/stats1a.h => main/lzo/src/stats1a.h rename : lzo/src/stats1b.h => main/lzo/src/stats1b.h rename : lzo/src/stats1c.h => main/lzo/src/stats1c.h rename : lzo/stamp-h1 => main/lzo/stamp-h1 rename : lzo/tests/.deps/align.Po => main/lzo/tests/.deps/align.Po rename : lzo/tests/.deps/chksum.Po => main/lzo/tests/.deps/chksum.Po rename : lzo/tests/.deps/promote.Po => main/lzo/tests/.deps/promote.Po rename : lzo/tests/.deps/sizes.Po => main/lzo/tests/.deps/sizes.Po rename : lzo/tests/Makefile => main/lzo/tests/Makefile rename : lzo/tests/Makefile.am => main/lzo/tests/Makefile.am rename : lzo/tests/Makefile.in => main/lzo/tests/Makefile.in rename : lzo/tests/align.c => main/lzo/tests/align.c rename : lzo/tests/chksum.c => main/lzo/tests/chksum.c rename : lzo/tests/promote.c => main/lzo/tests/promote.c rename : lzo/tests/sizes.c => main/lzo/tests/sizes.c rename : lzo/util/check.sh => main/lzo/util/check.sh rename : lzo/util/checkasm.sh => main/lzo/util/checkasm.sh rename : lzo/util/notime.pl => main/lzo/util/notime.pl rename : lzo/util/overlap.sh => main/lzo/util/overlap.sh rename : lzo/util/shortf.pl => main/lzo/util/shortf.pl rename : lzo/util/table.pl => main/lzo/util/table.pl rename : lzo/util/uncompr.pl => main/lzo/util/uncompr.pl rename : openssl/Android.mk => main/openssl/Android.mk rename : openssl/CleanSpec.mk => main/openssl/CleanSpec.mk rename : openssl/MODULE_LICENSE_BSD_LIKE => main/openssl/MODULE_LICENSE_BSD_LIKE rename : openssl/NOTICE => main/openssl/NOTICE rename : openssl/README.android => main/openssl/README.android rename : openssl/ThirdPartyProject.prop => main/openssl/ThirdPartyProject.prop rename : openssl/android-config.mk => main/openssl/android-config.mk rename : openssl/android.testssl/CAss.cnf => main/openssl/android.testssl/CAss.cnf rename : openssl/android.testssl/Uss.cnf => main/openssl/android.testssl/Uss.cnf rename : openssl/android.testssl/server2.pem => main/openssl/android.testssl/server2.pem rename : openssl/android.testssl/testssl => main/openssl/android.testssl/testssl rename : openssl/android.testssl/testssl.sh => main/openssl/android.testssl/testssl.sh rename : openssl/apps/Android.mk => main/openssl/apps/Android.mk rename : openssl/apps/CA.pl => main/openssl/apps/CA.pl rename : openssl/apps/CA.pl.in => main/openssl/apps/CA.pl.in rename : openssl/apps/CA.sh => main/openssl/apps/CA.sh rename : openssl/apps/app_rand.c => main/openssl/apps/app_rand.c rename : openssl/apps/apps.c => main/openssl/apps/apps.c rename : openssl/apps/apps.h => main/openssl/apps/apps.h rename : openssl/apps/asn1pars.c => main/openssl/apps/asn1pars.c rename : openssl/apps/ca-cert.srl => main/openssl/apps/ca-cert.srl rename : openssl/apps/ca-key.pem => main/openssl/apps/ca-key.pem rename : openssl/apps/ca-req.pem => main/openssl/apps/ca-req.pem rename : openssl/apps/ca.c => main/openssl/apps/ca.c rename : openssl/apps/cert.pem => main/openssl/apps/cert.pem rename : openssl/apps/ciphers.c => main/openssl/apps/ciphers.c rename : openssl/apps/client.pem => main/openssl/apps/client.pem rename : openssl/apps/cms.c => main/openssl/apps/cms.c rename : openssl/apps/crl.c => main/openssl/apps/crl.c rename : openssl/apps/crl2p7.c => main/openssl/apps/crl2p7.c rename : openssl/apps/dgst.c => main/openssl/apps/dgst.c rename : openssl/apps/dh.c => main/openssl/apps/dh.c rename : openssl/apps/dh1024.pem => main/openssl/apps/dh1024.pem rename : openssl/apps/dh2048.pem => main/openssl/apps/dh2048.pem rename : openssl/apps/dh4096.pem => main/openssl/apps/dh4096.pem rename : openssl/apps/dh512.pem => main/openssl/apps/dh512.pem rename : openssl/apps/dhparam.c => main/openssl/apps/dhparam.c rename : openssl/apps/dsa-ca.pem => main/openssl/apps/dsa-ca.pem rename : openssl/apps/dsa-pca.pem => main/openssl/apps/dsa-pca.pem rename : openssl/apps/dsa.c => main/openssl/apps/dsa.c rename : openssl/apps/dsa1024.pem => main/openssl/apps/dsa1024.pem rename : openssl/apps/dsa512.pem => main/openssl/apps/dsa512.pem rename : openssl/apps/dsap.pem => main/openssl/apps/dsap.pem rename : openssl/apps/dsaparam.c => main/openssl/apps/dsaparam.c rename : openssl/apps/ec.c => main/openssl/apps/ec.c rename : openssl/apps/ecparam.c => main/openssl/apps/ecparam.c rename : openssl/apps/enc.c => main/openssl/apps/enc.c rename : openssl/apps/engine.c => main/openssl/apps/engine.c rename : openssl/apps/errstr.c => main/openssl/apps/errstr.c rename : openssl/apps/gendh.c => main/openssl/apps/gendh.c rename : openssl/apps/gendsa.c => main/openssl/apps/gendsa.c rename : openssl/apps/genpkey.c => main/openssl/apps/genpkey.c rename : openssl/apps/genrsa.c => main/openssl/apps/genrsa.c rename : openssl/apps/md4.c => main/openssl/apps/md4.c rename : openssl/apps/nseq.c => main/openssl/apps/nseq.c rename : openssl/apps/ocsp.c => main/openssl/apps/ocsp.c rename : openssl/apps/oid.cnf => main/openssl/apps/oid.cnf rename : openssl/apps/openssl.c => main/openssl/apps/openssl.c rename : openssl/apps/openssl.cnf => main/openssl/apps/openssl.cnf rename : openssl/apps/passwd.c => main/openssl/apps/passwd.c rename : openssl/apps/pca-cert.srl => main/openssl/apps/pca-cert.srl rename : openssl/apps/pca-key.pem => main/openssl/apps/pca-key.pem rename : openssl/apps/pca-req.pem => main/openssl/apps/pca-req.pem rename : openssl/apps/pkcs12.c => main/openssl/apps/pkcs12.c rename : openssl/apps/pkcs7.c => main/openssl/apps/pkcs7.c rename : openssl/apps/pkcs8.c => main/openssl/apps/pkcs8.c rename : openssl/apps/pkey.c => main/openssl/apps/pkey.c rename : openssl/apps/pkeyparam.c => main/openssl/apps/pkeyparam.c rename : openssl/apps/pkeyutl.c => main/openssl/apps/pkeyutl.c rename : openssl/apps/prime.c => main/openssl/apps/prime.c rename : openssl/apps/privkey.pem => main/openssl/apps/privkey.pem rename : openssl/apps/progs.h => main/openssl/apps/progs.h rename : openssl/apps/progs.pl => main/openssl/apps/progs.pl rename : openssl/apps/rand.c => main/openssl/apps/rand.c rename : openssl/apps/req.c => main/openssl/apps/req.c rename : openssl/apps/req.pem => main/openssl/apps/req.pem rename : openssl/apps/rsa.c => main/openssl/apps/rsa.c rename : openssl/apps/rsa8192.pem => main/openssl/apps/rsa8192.pem rename : openssl/apps/rsautl.c => main/openssl/apps/rsautl.c rename : openssl/apps/s1024key.pem => main/openssl/apps/s1024key.pem rename : openssl/apps/s1024req.pem => main/openssl/apps/s1024req.pem rename : openssl/apps/s512-key.pem => main/openssl/apps/s512-key.pem rename : openssl/apps/s512-req.pem => main/openssl/apps/s512-req.pem rename : openssl/apps/s_apps.h => main/openssl/apps/s_apps.h rename : openssl/apps/s_cb.c => main/openssl/apps/s_cb.c rename : openssl/apps/s_client.c => main/openssl/apps/s_client.c rename : openssl/apps/s_server.c => main/openssl/apps/s_server.c rename : openssl/apps/s_socket.c => main/openssl/apps/s_socket.c rename : openssl/apps/s_time.c => main/openssl/apps/s_time.c rename : openssl/apps/server.pem => main/openssl/apps/server.pem rename : openssl/apps/server.srl => main/openssl/apps/server.srl rename : openssl/apps/server2.pem => main/openssl/apps/server2.pem rename : openssl/apps/sess_id.c => main/openssl/apps/sess_id.c rename : openssl/apps/smime.c => main/openssl/apps/smime.c rename : openssl/apps/speed.c => main/openssl/apps/speed.c rename : openssl/apps/spkac.c => main/openssl/apps/spkac.c rename : openssl/apps/testCA.pem => main/openssl/apps/testCA.pem rename : openssl/apps/testdsa.h => main/openssl/apps/testdsa.h rename : openssl/apps/testrsa.h => main/openssl/apps/testrsa.h rename : openssl/apps/timeouts.h => main/openssl/apps/timeouts.h rename : openssl/apps/verify.c => main/openssl/apps/verify.c rename : openssl/apps/version.c => main/openssl/apps/version.c rename : openssl/apps/winrand.c => main/openssl/apps/winrand.c rename : openssl/apps/x509.c => main/openssl/apps/x509.c rename : openssl/crypto/Android.mk => main/openssl/crypto/Android.mk rename : openssl/crypto/LPdir_nyi.c => main/openssl/crypto/LPdir_nyi.c rename : openssl/crypto/LPdir_unix.c => main/openssl/crypto/LPdir_unix.c rename : openssl/crypto/LPdir_win.c => main/openssl/crypto/LPdir_win.c rename : openssl/crypto/LPdir_wince.c => main/openssl/crypto/LPdir_wince.c rename : openssl/crypto/aes/README => main/openssl/crypto/aes/README rename : openssl/crypto/aes/aes.h => main/openssl/crypto/aes/aes.h rename : openssl/crypto/aes/aes_cbc.c => main/openssl/crypto/aes/aes_cbc.c rename : openssl/crypto/aes/aes_cfb.c => main/openssl/crypto/aes/aes_cfb.c rename : openssl/crypto/aes/aes_core.c => main/openssl/crypto/aes/aes_core.c rename : openssl/crypto/aes/aes_ctr.c => main/openssl/crypto/aes/aes_ctr.c rename : openssl/crypto/aes/aes_ecb.c => main/openssl/crypto/aes/aes_ecb.c rename : openssl/crypto/aes/aes_ige.c => main/openssl/crypto/aes/aes_ige.c rename : openssl/crypto/aes/aes_locl.h => main/openssl/crypto/aes/aes_locl.h rename : openssl/crypto/aes/aes_misc.c => main/openssl/crypto/aes/aes_misc.c rename : openssl/crypto/aes/aes_ofb.c => main/openssl/crypto/aes/aes_ofb.c rename : openssl/crypto/aes/aes_wrap.c => main/openssl/crypto/aes/aes_wrap.c rename : openssl/crypto/aes/aes_x86core.c => main/openssl/crypto/aes/aes_x86core.c rename : openssl/crypto/aes/asm/aes-586.pl => main/openssl/crypto/aes/asm/aes-586.pl rename : openssl/crypto/aes/asm/aes-armv4.pl => main/openssl/crypto/aes/asm/aes-armv4.pl rename : openssl/crypto/aes/asm/aes-armv4.s => main/openssl/crypto/aes/asm/aes-armv4.s rename : openssl/crypto/aes/asm/aes-ia64.S => main/openssl/crypto/aes/asm/aes-ia64.S rename : openssl/crypto/aes/asm/aes-ppc.pl => main/openssl/crypto/aes/asm/aes-ppc.pl rename : openssl/crypto/aes/asm/aes-s390x.pl => main/openssl/crypto/aes/asm/aes-s390x.pl rename : openssl/crypto/aes/asm/aes-sparcv9.pl => main/openssl/crypto/aes/asm/aes-sparcv9.pl rename : openssl/crypto/aes/asm/aes-x86_64.pl => main/openssl/crypto/aes/asm/aes-x86_64.pl rename : openssl/crypto/alphacpuid.pl => main/openssl/crypto/alphacpuid.pl rename : openssl/crypto/asn1/a_bitstr.c => main/openssl/crypto/asn1/a_bitstr.c rename : openssl/crypto/asn1/a_bool.c => main/openssl/crypto/asn1/a_bool.c rename : openssl/crypto/asn1/a_bytes.c => main/openssl/crypto/asn1/a_bytes.c rename : openssl/crypto/asn1/a_d2i_fp.c => main/openssl/crypto/asn1/a_d2i_fp.c rename : openssl/crypto/asn1/a_digest.c => main/openssl/crypto/asn1/a_digest.c rename : openssl/crypto/asn1/a_dup.c => main/openssl/crypto/asn1/a_dup.c rename : openssl/crypto/asn1/a_enum.c => main/openssl/crypto/asn1/a_enum.c rename : openssl/crypto/asn1/a_gentm.c => main/openssl/crypto/asn1/a_gentm.c rename : openssl/crypto/asn1/a_i2d_fp.c => main/openssl/crypto/asn1/a_i2d_fp.c rename : openssl/crypto/asn1/a_int.c => main/openssl/crypto/asn1/a_int.c rename : openssl/crypto/asn1/a_mbstr.c => main/openssl/crypto/asn1/a_mbstr.c rename : openssl/crypto/asn1/a_object.c => main/openssl/crypto/asn1/a_object.c rename : openssl/crypto/asn1/a_octet.c => main/openssl/crypto/asn1/a_octet.c rename : openssl/crypto/asn1/a_print.c => main/openssl/crypto/asn1/a_print.c rename : openssl/crypto/asn1/a_set.c => main/openssl/crypto/asn1/a_set.c rename : openssl/crypto/asn1/a_sign.c => main/openssl/crypto/asn1/a_sign.c rename : openssl/crypto/asn1/a_strex.c => main/openssl/crypto/asn1/a_strex.c rename : openssl/crypto/asn1/a_strnid.c => main/openssl/crypto/asn1/a_strnid.c rename : openssl/crypto/asn1/a_time.c => main/openssl/crypto/asn1/a_time.c rename : openssl/crypto/asn1/a_type.c => main/openssl/crypto/asn1/a_type.c rename : openssl/crypto/asn1/a_utctm.c => main/openssl/crypto/asn1/a_utctm.c rename : openssl/crypto/asn1/a_utf8.c => main/openssl/crypto/asn1/a_utf8.c rename : openssl/crypto/asn1/a_verify.c => main/openssl/crypto/asn1/a_verify.c rename : openssl/crypto/asn1/ameth_lib.c => main/openssl/crypto/asn1/ameth_lib.c rename : openssl/crypto/asn1/asn1.h => main/openssl/crypto/asn1/asn1.h rename : openssl/crypto/asn1/asn1_err.c => main/openssl/crypto/asn1/asn1_err.c rename : openssl/crypto/asn1/asn1_gen.c => main/openssl/crypto/asn1/asn1_gen.c rename : openssl/crypto/asn1/asn1_lib.c => main/openssl/crypto/asn1/asn1_lib.c rename : openssl/crypto/asn1/asn1_locl.h => main/openssl/crypto/asn1/asn1_locl.h rename : openssl/crypto/asn1/asn1_mac.h => main/openssl/crypto/asn1/asn1_mac.h rename : openssl/crypto/asn1/asn1_par.c => main/openssl/crypto/asn1/asn1_par.c rename : openssl/crypto/asn1/asn1t.h => main/openssl/crypto/asn1/asn1t.h rename : openssl/crypto/asn1/asn_mime.c => main/openssl/crypto/asn1/asn_mime.c rename : openssl/crypto/asn1/asn_moid.c => main/openssl/crypto/asn1/asn_moid.c rename : openssl/crypto/asn1/asn_pack.c => main/openssl/crypto/asn1/asn_pack.c rename : openssl/crypto/asn1/bio_asn1.c => main/openssl/crypto/asn1/bio_asn1.c rename : openssl/crypto/asn1/bio_ndef.c => main/openssl/crypto/asn1/bio_ndef.c rename : openssl/crypto/asn1/charmap.h => main/openssl/crypto/asn1/charmap.h rename : openssl/crypto/asn1/charmap.pl => main/openssl/crypto/asn1/charmap.pl rename : openssl/crypto/asn1/d2i_pr.c => main/openssl/crypto/asn1/d2i_pr.c rename : openssl/crypto/asn1/d2i_pu.c => main/openssl/crypto/asn1/d2i_pu.c rename : openssl/crypto/asn1/evp_asn1.c => main/openssl/crypto/asn1/evp_asn1.c rename : openssl/crypto/asn1/f_enum.c => main/openssl/crypto/asn1/f_enum.c rename : openssl/crypto/asn1/f_int.c => main/openssl/crypto/asn1/f_int.c rename : openssl/crypto/asn1/f_string.c => main/openssl/crypto/asn1/f_string.c rename : openssl/crypto/asn1/i2d_pr.c => main/openssl/crypto/asn1/i2d_pr.c rename : openssl/crypto/asn1/i2d_pu.c => main/openssl/crypto/asn1/i2d_pu.c rename : openssl/crypto/asn1/n_pkey.c => main/openssl/crypto/asn1/n_pkey.c rename : openssl/crypto/asn1/nsseq.c => main/openssl/crypto/asn1/nsseq.c rename : openssl/crypto/asn1/p5_pbe.c => main/openssl/crypto/asn1/p5_pbe.c rename : openssl/crypto/asn1/p5_pbev2.c => main/openssl/crypto/asn1/p5_pbev2.c rename : openssl/crypto/asn1/p8_pkey.c => main/openssl/crypto/asn1/p8_pkey.c rename : openssl/crypto/asn1/t_bitst.c => main/openssl/crypto/asn1/t_bitst.c rename : openssl/crypto/asn1/t_crl.c => main/openssl/crypto/asn1/t_crl.c rename : openssl/crypto/asn1/t_pkey.c => main/openssl/crypto/asn1/t_pkey.c rename : openssl/crypto/asn1/t_req.c => main/openssl/crypto/asn1/t_req.c rename : openssl/crypto/asn1/t_spki.c => main/openssl/crypto/asn1/t_spki.c rename : openssl/crypto/asn1/t_x509.c => main/openssl/crypto/asn1/t_x509.c rename : openssl/crypto/asn1/t_x509a.c => main/openssl/crypto/asn1/t_x509a.c rename : openssl/crypto/asn1/tasn_dec.c => main/openssl/crypto/asn1/tasn_dec.c rename : openssl/crypto/asn1/tasn_enc.c => main/openssl/crypto/asn1/tasn_enc.c rename : openssl/crypto/asn1/tasn_fre.c => main/openssl/crypto/asn1/tasn_fre.c rename : openssl/crypto/asn1/tasn_new.c => main/openssl/crypto/asn1/tasn_new.c rename : openssl/crypto/asn1/tasn_prn.c => main/openssl/crypto/asn1/tasn_prn.c rename : openssl/crypto/asn1/tasn_typ.c => main/openssl/crypto/asn1/tasn_typ.c rename : openssl/crypto/asn1/tasn_utl.c => main/openssl/crypto/asn1/tasn_utl.c rename : openssl/crypto/asn1/x_algor.c => main/openssl/crypto/asn1/x_algor.c rename : openssl/crypto/asn1/x_attrib.c => main/openssl/crypto/asn1/x_attrib.c rename : openssl/crypto/asn1/x_bignum.c => main/openssl/crypto/asn1/x_bignum.c rename : openssl/crypto/asn1/x_crl.c => main/openssl/crypto/asn1/x_crl.c rename : openssl/crypto/asn1/x_exten.c => main/openssl/crypto/asn1/x_exten.c rename : openssl/crypto/asn1/x_info.c => main/openssl/crypto/asn1/x_info.c rename : openssl/crypto/asn1/x_long.c => main/openssl/crypto/asn1/x_long.c rename : openssl/crypto/asn1/x_name.c => main/openssl/crypto/asn1/x_name.c rename : openssl/crypto/asn1/x_nx509.c => main/openssl/crypto/asn1/x_nx509.c rename : openssl/crypto/asn1/x_pkey.c => main/openssl/crypto/asn1/x_pkey.c rename : openssl/crypto/asn1/x_pubkey.c => main/openssl/crypto/asn1/x_pubkey.c rename : openssl/crypto/asn1/x_req.c => main/openssl/crypto/asn1/x_req.c rename : openssl/crypto/asn1/x_sig.c => main/openssl/crypto/asn1/x_sig.c rename : openssl/crypto/asn1/x_spki.c => main/openssl/crypto/asn1/x_spki.c rename : openssl/crypto/asn1/x_val.c => main/openssl/crypto/asn1/x_val.c rename : openssl/crypto/asn1/x_x509.c => main/openssl/crypto/asn1/x_x509.c rename : openssl/crypto/asn1/x_x509a.c => main/openssl/crypto/asn1/x_x509a.c rename : openssl/crypto/bf/COPYRIGHT => main/openssl/crypto/bf/COPYRIGHT rename : openssl/crypto/bf/asm/bf-586.pl => main/openssl/crypto/bf/asm/bf-586.pl rename : openssl/crypto/bf/asm/bf-686.pl => main/openssl/crypto/bf/asm/bf-686.pl rename : openssl/crypto/bf/bf_cfb64.c => main/openssl/crypto/bf/bf_cfb64.c rename : openssl/crypto/bf/bf_ecb.c => main/openssl/crypto/bf/bf_ecb.c rename : openssl/crypto/bf/bf_enc.c => main/openssl/crypto/bf/bf_enc.c rename : openssl/crypto/bf/bf_locl.h => main/openssl/crypto/bf/bf_locl.h rename : openssl/crypto/bf/bf_ofb64.c => main/openssl/crypto/bf/bf_ofb64.c rename : openssl/crypto/bf/bf_pi.h => main/openssl/crypto/bf/bf_pi.h rename : openssl/crypto/bf/bf_skey.c => main/openssl/crypto/bf/bf_skey.c rename : openssl/crypto/bf/blowfish.h => main/openssl/crypto/bf/blowfish.h rename : openssl/crypto/bio/b_dump.c => main/openssl/crypto/bio/b_dump.c rename : openssl/crypto/bio/b_print.c => main/openssl/crypto/bio/b_print.c rename : openssl/crypto/bio/b_sock.c => main/openssl/crypto/bio/b_sock.c rename : openssl/crypto/bio/bf_buff.c => main/openssl/crypto/bio/bf_buff.c rename : openssl/crypto/bio/bf_lbuf.c => main/openssl/crypto/bio/bf_lbuf.c rename : openssl/crypto/bio/bf_nbio.c => main/openssl/crypto/bio/bf_nbio.c rename : openssl/crypto/bio/bf_null.c => main/openssl/crypto/bio/bf_null.c rename : openssl/crypto/bio/bio.h => main/openssl/crypto/bio/bio.h rename : openssl/crypto/bio/bio_cb.c => main/openssl/crypto/bio/bio_cb.c rename : openssl/crypto/bio/bio_err.c => main/openssl/crypto/bio/bio_err.c rename : openssl/crypto/bio/bio_lcl.h => main/openssl/crypto/bio/bio_lcl.h rename : openssl/crypto/bio/bio_lib.c => main/openssl/crypto/bio/bio_lib.c rename : openssl/crypto/bio/bss_acpt.c => main/openssl/crypto/bio/bss_acpt.c rename : openssl/crypto/bio/bss_bio.c => main/openssl/crypto/bio/bss_bio.c rename : openssl/crypto/bio/bss_conn.c => main/openssl/crypto/bio/bss_conn.c rename : openssl/crypto/bio/bss_dgram.c => main/openssl/crypto/bio/bss_dgram.c rename : openssl/crypto/bio/bss_fd.c => main/openssl/crypto/bio/bss_fd.c rename : openssl/crypto/bio/bss_file.c => main/openssl/crypto/bio/bss_file.c rename : openssl/crypto/bio/bss_log.c => main/openssl/crypto/bio/bss_log.c rename : openssl/crypto/bio/bss_mem.c => main/openssl/crypto/bio/bss_mem.c rename : openssl/crypto/bio/bss_null.c => main/openssl/crypto/bio/bss_null.c rename : openssl/crypto/bio/bss_sock.c => main/openssl/crypto/bio/bss_sock.c rename : openssl/crypto/bn/asm/README => main/openssl/crypto/bn/asm/README rename : openssl/crypto/bn/asm/alpha-mont.pl => main/openssl/crypto/bn/asm/alpha-mont.pl rename : openssl/crypto/bn/asm/armv4-mont.pl => main/openssl/crypto/bn/asm/armv4-mont.pl rename : openssl/crypto/bn/asm/armv4-mont.s => main/openssl/crypto/bn/asm/armv4-mont.s rename : openssl/crypto/bn/asm/bn-586.pl => main/openssl/crypto/bn/asm/bn-586.pl rename : openssl/crypto/bn/asm/co-586.pl => main/openssl/crypto/bn/asm/co-586.pl rename : openssl/crypto/bn/asm/ia64.S => main/openssl/crypto/bn/asm/ia64.S rename : openssl/crypto/bn/asm/mips3-mont.pl => main/openssl/crypto/bn/asm/mips3-mont.pl rename : openssl/crypto/bn/asm/mips3.s => main/openssl/crypto/bn/asm/mips3.s rename : openssl/crypto/bn/asm/pa-risc2.s => main/openssl/crypto/bn/asm/pa-risc2.s rename : openssl/crypto/bn/asm/pa-risc2W.s => main/openssl/crypto/bn/asm/pa-risc2W.s rename : openssl/crypto/bn/asm/ppc-mont.pl => main/openssl/crypto/bn/asm/ppc-mont.pl rename : openssl/crypto/bn/asm/ppc.pl => main/openssl/crypto/bn/asm/ppc.pl rename : openssl/crypto/bn/asm/ppc64-mont.pl => main/openssl/crypto/bn/asm/ppc64-mont.pl rename : openssl/crypto/bn/asm/s390x-mont.pl => main/openssl/crypto/bn/asm/s390x-mont.pl rename : openssl/crypto/bn/asm/s390x.S => main/openssl/crypto/bn/asm/s390x.S rename : openssl/crypto/bn/asm/sparcv8.S => main/openssl/crypto/bn/asm/sparcv8.S rename : openssl/crypto/bn/asm/sparcv8plus.S => main/openssl/crypto/bn/asm/sparcv8plus.S rename : openssl/crypto/bn/asm/sparcv9-mont.pl => main/openssl/crypto/bn/asm/sparcv9-mont.pl rename : openssl/crypto/bn/asm/sparcv9a-mont.pl => main/openssl/crypto/bn/asm/sparcv9a-mont.pl rename : openssl/crypto/bn/asm/via-mont.pl => main/openssl/crypto/bn/asm/via-mont.pl rename : openssl/crypto/bn/asm/x86-mont.pl => main/openssl/crypto/bn/asm/x86-mont.pl rename : openssl/crypto/bn/asm/x86.pl => main/openssl/crypto/bn/asm/x86.pl rename : openssl/crypto/bn/asm/x86/add.pl => main/openssl/crypto/bn/asm/x86/add.pl rename : openssl/crypto/bn/asm/x86/comba.pl => main/openssl/crypto/bn/asm/x86/comba.pl rename : openssl/crypto/bn/asm/x86/div.pl => main/openssl/crypto/bn/asm/x86/div.pl rename : openssl/crypto/bn/asm/x86/f => main/openssl/crypto/bn/asm/x86/f rename : openssl/crypto/bn/asm/x86/mul.pl => main/openssl/crypto/bn/asm/x86/mul.pl rename : openssl/crypto/bn/asm/x86/mul_add.pl => main/openssl/crypto/bn/asm/x86/mul_add.pl rename : openssl/crypto/bn/asm/x86/sqr.pl => main/openssl/crypto/bn/asm/x86/sqr.pl rename : openssl/crypto/bn/asm/x86/sub.pl => main/openssl/crypto/bn/asm/x86/sub.pl rename : openssl/crypto/bn/asm/x86_64-gcc.c => main/openssl/crypto/bn/asm/x86_64-gcc.c rename : openssl/crypto/bn/asm/x86_64-mont.pl => main/openssl/crypto/bn/asm/x86_64-mont.pl rename : openssl/crypto/bn/bn.h => main/openssl/crypto/bn/bn.h rename : openssl/crypto/bn/bn.mul => main/openssl/crypto/bn/bn.mul rename : openssl/crypto/bn/bn_add.c => main/openssl/crypto/bn/bn_add.c rename : openssl/crypto/bn/bn_asm.c => main/openssl/crypto/bn/bn_asm.c rename : openssl/crypto/bn/bn_blind.c => main/openssl/crypto/bn/bn_blind.c rename : openssl/crypto/bn/bn_const.c => main/openssl/crypto/bn/bn_const.c rename : openssl/crypto/bn/bn_ctx.c => main/openssl/crypto/bn/bn_ctx.c rename : openssl/crypto/bn/bn_depr.c => main/openssl/crypto/bn/bn_depr.c rename : openssl/crypto/bn/bn_div.c => main/openssl/crypto/bn/bn_div.c rename : openssl/crypto/bn/bn_err.c => main/openssl/crypto/bn/bn_err.c rename : openssl/crypto/bn/bn_exp.c => main/openssl/crypto/bn/bn_exp.c rename : openssl/crypto/bn/bn_exp2.c => main/openssl/crypto/bn/bn_exp2.c rename : openssl/crypto/bn/bn_gcd.c => main/openssl/crypto/bn/bn_gcd.c rename : openssl/crypto/bn/bn_gf2m.c => main/openssl/crypto/bn/bn_gf2m.c rename : openssl/crypto/bn/bn_kron.c => main/openssl/crypto/bn/bn_kron.c rename : openssl/crypto/bn/bn_lcl.h => main/openssl/crypto/bn/bn_lcl.h rename : openssl/crypto/bn/bn_lib.c => main/openssl/crypto/bn/bn_lib.c rename : openssl/crypto/bn/bn_mod.c => main/openssl/crypto/bn/bn_mod.c rename : openssl/crypto/bn/bn_mont.c => main/openssl/crypto/bn/bn_mont.c rename : openssl/crypto/bn/bn_mpi.c => main/openssl/crypto/bn/bn_mpi.c rename : openssl/crypto/bn/bn_mul.c => main/openssl/crypto/bn/bn_mul.c rename : openssl/crypto/bn/bn_nist.c => main/openssl/crypto/bn/bn_nist.c rename : openssl/crypto/bn/bn_prime.c => main/openssl/crypto/bn/bn_prime.c rename : openssl/crypto/bn/bn_prime.h => main/openssl/crypto/bn/bn_prime.h rename : openssl/crypto/bn/bn_prime.pl => main/openssl/crypto/bn/bn_prime.pl rename : openssl/crypto/bn/bn_print.c => main/openssl/crypto/bn/bn_print.c rename : openssl/crypto/bn/bn_rand.c => main/openssl/crypto/bn/bn_rand.c rename : openssl/crypto/bn/bn_recp.c => main/openssl/crypto/bn/bn_recp.c rename : openssl/crypto/bn/bn_shift.c => main/openssl/crypto/bn/bn_shift.c rename : openssl/crypto/bn/bn_sqr.c => main/openssl/crypto/bn/bn_sqr.c rename : openssl/crypto/bn/bn_sqrt.c => main/openssl/crypto/bn/bn_sqrt.c rename : openssl/crypto/bn/bn_word.c => main/openssl/crypto/bn/bn_word.c rename : openssl/crypto/bn/bnspeed.c => main/openssl/crypto/bn/bnspeed.c rename : openssl/crypto/bn/bntest.c => main/openssl/crypto/bn/bntest.c rename : openssl/crypto/bn/divtest.c => main/openssl/crypto/bn/divtest.c rename : openssl/crypto/bn/exp.c => main/openssl/crypto/bn/exp.c rename : openssl/crypto/bn/expspeed.c => main/openssl/crypto/bn/expspeed.c rename : openssl/crypto/bn/exptest.c => main/openssl/crypto/bn/exptest.c rename : openssl/crypto/bn/todo => main/openssl/crypto/bn/todo rename : openssl/crypto/buffer/buf_err.c => main/openssl/crypto/buffer/buf_err.c rename : openssl/crypto/buffer/buffer.c => main/openssl/crypto/buffer/buffer.c rename : openssl/crypto/buffer/buffer.h => main/openssl/crypto/buffer/buffer.h rename : openssl/crypto/comp/c_rle.c => main/openssl/crypto/comp/c_rle.c rename : openssl/crypto/comp/c_zlib.c => main/openssl/crypto/comp/c_zlib.c rename : openssl/crypto/comp/comp.h => main/openssl/crypto/comp/comp.h rename : openssl/crypto/comp/comp_err.c => main/openssl/crypto/comp/comp_err.c rename : openssl/crypto/comp/comp_lib.c => main/openssl/crypto/comp/comp_lib.c rename : openssl/crypto/conf/README => main/openssl/crypto/conf/README rename : openssl/crypto/conf/cnf_save.c => main/openssl/crypto/conf/cnf_save.c rename : openssl/crypto/conf/conf.h => main/openssl/crypto/conf/conf.h rename : openssl/crypto/conf/conf_api.c => main/openssl/crypto/conf/conf_api.c rename : openssl/crypto/conf/conf_api.h => main/openssl/crypto/conf/conf_api.h rename : openssl/crypto/conf/conf_def.c => main/openssl/crypto/conf/conf_def.c rename : openssl/crypto/conf/conf_def.h => main/openssl/crypto/conf/conf_def.h rename : openssl/crypto/conf/conf_err.c => main/openssl/crypto/conf/conf_err.c rename : openssl/crypto/conf/conf_lib.c => main/openssl/crypto/conf/conf_lib.c rename : openssl/crypto/conf/conf_mall.c => main/openssl/crypto/conf/conf_mall.c rename : openssl/crypto/conf/conf_mod.c => main/openssl/crypto/conf/conf_mod.c rename : openssl/crypto/conf/conf_sap.c => main/openssl/crypto/conf/conf_sap.c rename : openssl/crypto/conf/keysets.pl => main/openssl/crypto/conf/keysets.pl rename : openssl/crypto/conf/ssleay.cnf => main/openssl/crypto/conf/ssleay.cnf rename : openssl/crypto/conf/test.c => main/openssl/crypto/conf/test.c rename : openssl/crypto/cpt_err.c => main/openssl/crypto/cpt_err.c rename : openssl/crypto/cryptlib.c => main/openssl/crypto/cryptlib.c rename : openssl/crypto/cryptlib.h => main/openssl/crypto/cryptlib.h rename : openssl/crypto/crypto.h => main/openssl/crypto/crypto.h rename : openssl/crypto/cversion.c => main/openssl/crypto/cversion.c rename : openssl/crypto/des/COPYRIGHT => main/openssl/crypto/des/COPYRIGHT rename : openssl/crypto/des/DES.pm => main/openssl/crypto/des/DES.pm rename : openssl/crypto/des/DES.xs => main/openssl/crypto/des/DES.xs rename : openssl/crypto/des/FILES0 => main/openssl/crypto/des/FILES0 rename : openssl/crypto/des/INSTALL => main/openssl/crypto/des/INSTALL rename : openssl/crypto/des/Imakefile => main/openssl/crypto/des/Imakefile rename : openssl/crypto/des/KERBEROS => main/openssl/crypto/des/KERBEROS rename : openssl/crypto/des/README => main/openssl/crypto/des/README rename : openssl/crypto/des/VERSION => main/openssl/crypto/des/VERSION rename : openssl/crypto/des/asm/crypt586.pl => main/openssl/crypto/des/asm/crypt586.pl rename : openssl/crypto/des/asm/des-586.pl => main/openssl/crypto/des/asm/des-586.pl rename : openssl/crypto/des/asm/des_enc.m4 => main/openssl/crypto/des/asm/des_enc.m4 rename : openssl/crypto/des/asm/desboth.pl => main/openssl/crypto/des/asm/desboth.pl rename : openssl/crypto/des/asm/readme => main/openssl/crypto/des/asm/readme rename : openssl/crypto/des/cbc3_enc.c => main/openssl/crypto/des/cbc3_enc.c rename : openssl/crypto/des/cbc_cksm.c => main/openssl/crypto/des/cbc_cksm.c rename : openssl/crypto/des/cbc_enc.c => main/openssl/crypto/des/cbc_enc.c rename : openssl/crypto/des/cfb64ede.c => main/openssl/crypto/des/cfb64ede.c rename : openssl/crypto/des/cfb64enc.c => main/openssl/crypto/des/cfb64enc.c rename : openssl/crypto/des/cfb_enc.c => main/openssl/crypto/des/cfb_enc.c rename : openssl/crypto/des/des.c => main/openssl/crypto/des/des.c rename : openssl/crypto/des/des.h => main/openssl/crypto/des/des.h rename : openssl/crypto/des/des.pod => main/openssl/crypto/des/des.pod rename : openssl/crypto/des/des3s.cpp => main/openssl/crypto/des/des3s.cpp rename : openssl/crypto/des/des_enc.c => main/openssl/crypto/des/des_enc.c rename : openssl/crypto/des/des_locl.h => main/openssl/crypto/des/des_locl.h rename : openssl/crypto/des/des_old.c => main/openssl/crypto/des/des_old.c rename : openssl/crypto/des/des_old.h => main/openssl/crypto/des/des_old.h rename : openssl/crypto/des/des_old2.c => main/openssl/crypto/des/des_old2.c rename : openssl/crypto/des/des_opts.c => main/openssl/crypto/des/des_opts.c rename : openssl/crypto/des/des_ver.h => main/openssl/crypto/des/des_ver.h rename : openssl/crypto/des/dess.cpp => main/openssl/crypto/des/dess.cpp rename : openssl/crypto/des/destest.c => main/openssl/crypto/des/destest.c rename : openssl/crypto/des/ecb3_enc.c => main/openssl/crypto/des/ecb3_enc.c rename : openssl/crypto/des/ecb_enc.c => main/openssl/crypto/des/ecb_enc.c rename : openssl/crypto/des/ede_cbcm_enc.c => main/openssl/crypto/des/ede_cbcm_enc.c rename : openssl/crypto/des/enc_read.c => main/openssl/crypto/des/enc_read.c rename : openssl/crypto/des/enc_writ.c => main/openssl/crypto/des/enc_writ.c rename : openssl/crypto/des/fcrypt.c => main/openssl/crypto/des/fcrypt.c rename : openssl/crypto/des/fcrypt_b.c => main/openssl/crypto/des/fcrypt_b.c rename : openssl/crypto/des/makefile.bc => main/openssl/crypto/des/makefile.bc rename : openssl/crypto/des/ncbc_enc.c => main/openssl/crypto/des/ncbc_enc.c rename : openssl/crypto/des/ofb64ede.c => main/openssl/crypto/des/ofb64ede.c rename : openssl/crypto/des/ofb64enc.c => main/openssl/crypto/des/ofb64enc.c rename : openssl/crypto/des/ofb_enc.c => main/openssl/crypto/des/ofb_enc.c rename : openssl/crypto/des/options.txt => main/openssl/crypto/des/options.txt rename : openssl/crypto/des/pcbc_enc.c => main/openssl/crypto/des/pcbc_enc.c rename : openssl/crypto/des/qud_cksm.c => main/openssl/crypto/des/qud_cksm.c rename : openssl/crypto/des/rand_key.c => main/openssl/crypto/des/rand_key.c rename : openssl/crypto/des/read2pwd.c => main/openssl/crypto/des/read2pwd.c rename : openssl/crypto/des/read_pwd.c => main/openssl/crypto/des/read_pwd.c rename : openssl/crypto/des/rpc_des.h => main/openssl/crypto/des/rpc_des.h rename : openssl/crypto/des/rpc_enc.c => main/openssl/crypto/des/rpc_enc.c rename : openssl/crypto/des/rpw.c => main/openssl/crypto/des/rpw.c rename : openssl/crypto/des/set_key.c => main/openssl/crypto/des/set_key.c rename : openssl/crypto/des/speed.c => main/openssl/crypto/des/speed.c rename : openssl/crypto/des/spr.h => main/openssl/crypto/des/spr.h rename : openssl/crypto/des/str2key.c => main/openssl/crypto/des/str2key.c rename : openssl/crypto/des/t/test => main/openssl/crypto/des/t/test rename : openssl/crypto/des/times/486-50.sol => main/openssl/crypto/des/times/486-50.sol rename : openssl/crypto/des/times/586-100.lnx => main/openssl/crypto/des/times/586-100.lnx rename : openssl/crypto/des/times/686-200.fre => main/openssl/crypto/des/times/686-200.fre rename : openssl/crypto/des/times/aix.cc => main/openssl/crypto/des/times/aix.cc rename : openssl/crypto/des/times/alpha.cc => main/openssl/crypto/des/times/alpha.cc rename : openssl/crypto/des/times/hpux.cc => main/openssl/crypto/des/times/hpux.cc rename : openssl/crypto/des/times/sparc.gcc => main/openssl/crypto/des/times/sparc.gcc rename : openssl/crypto/des/times/usparc.cc => main/openssl/crypto/des/times/usparc.cc rename : openssl/crypto/des/typemap => main/openssl/crypto/des/typemap rename : openssl/crypto/des/xcbc_enc.c => main/openssl/crypto/des/xcbc_enc.c rename : openssl/crypto/dh/dh.h => main/openssl/crypto/dh/dh.h rename : openssl/crypto/dh/dh1024.pem => main/openssl/crypto/dh/dh1024.pem rename : openssl/crypto/dh/dh192.pem => main/openssl/crypto/dh/dh192.pem rename : openssl/crypto/dh/dh2048.pem => main/openssl/crypto/dh/dh2048.pem rename : openssl/crypto/dh/dh4096.pem => main/openssl/crypto/dh/dh4096.pem rename : openssl/crypto/dh/dh512.pem => main/openssl/crypto/dh/dh512.pem rename : openssl/crypto/dh/dh_ameth.c => main/openssl/crypto/dh/dh_ameth.c rename : openssl/crypto/dh/dh_asn1.c => main/openssl/crypto/dh/dh_asn1.c rename : openssl/crypto/dh/dh_check.c => main/openssl/crypto/dh/dh_check.c rename : openssl/crypto/dh/dh_depr.c => main/openssl/crypto/dh/dh_depr.c rename : openssl/crypto/dh/dh_err.c => main/openssl/crypto/dh/dh_err.c rename : openssl/crypto/dh/dh_gen.c => main/openssl/crypto/dh/dh_gen.c rename : openssl/crypto/dh/dh_key.c => main/openssl/crypto/dh/dh_key.c rename : openssl/crypto/dh/dh_lib.c => main/openssl/crypto/dh/dh_lib.c rename : openssl/crypto/dh/dh_pmeth.c => main/openssl/crypto/dh/dh_pmeth.c rename : openssl/crypto/dh/dhtest.c => main/openssl/crypto/dh/dhtest.c rename : openssl/crypto/dh/example => main/openssl/crypto/dh/example rename : openssl/crypto/dh/generate => main/openssl/crypto/dh/generate rename : openssl/crypto/dh/p1024.c => main/openssl/crypto/dh/p1024.c rename : openssl/crypto/dh/p192.c => main/openssl/crypto/dh/p192.c rename : openssl/crypto/dh/p512.c => main/openssl/crypto/dh/p512.c rename : openssl/crypto/dsa/README => main/openssl/crypto/dsa/README rename : openssl/crypto/dsa/dsa.h => main/openssl/crypto/dsa/dsa.h rename : openssl/crypto/dsa/dsa_ameth.c => main/openssl/crypto/dsa/dsa_ameth.c rename : openssl/crypto/dsa/dsa_asn1.c => main/openssl/crypto/dsa/dsa_asn1.c rename : openssl/crypto/dsa/dsa_depr.c => main/openssl/crypto/dsa/dsa_depr.c rename : openssl/crypto/dsa/dsa_err.c => main/openssl/crypto/dsa/dsa_err.c rename : openssl/crypto/dsa/dsa_gen.c => main/openssl/crypto/dsa/dsa_gen.c rename : openssl/crypto/dsa/dsa_key.c => main/openssl/crypto/dsa/dsa_key.c rename : openssl/crypto/dsa/dsa_lib.c => main/openssl/crypto/dsa/dsa_lib.c rename : openssl/crypto/dsa/dsa_locl.h => main/openssl/crypto/dsa/dsa_locl.h rename : openssl/crypto/dsa/dsa_ossl.c => main/openssl/crypto/dsa/dsa_ossl.c rename : openssl/crypto/dsa/dsa_pmeth.c => main/openssl/crypto/dsa/dsa_pmeth.c rename : openssl/crypto/dsa/dsa_prn.c => main/openssl/crypto/dsa/dsa_prn.c rename : openssl/crypto/dsa/dsa_sign.c => main/openssl/crypto/dsa/dsa_sign.c rename : openssl/crypto/dsa/dsa_vrf.c => main/openssl/crypto/dsa/dsa_vrf.c rename : openssl/crypto/dsa/dsagen.c => main/openssl/crypto/dsa/dsagen.c rename : openssl/crypto/dsa/dsatest.c => main/openssl/crypto/dsa/dsatest.c rename : openssl/crypto/dsa/fips186a.txt => main/openssl/crypto/dsa/fips186a.txt rename : openssl/crypto/dso/README => main/openssl/crypto/dso/README rename : openssl/crypto/dso/dso.h => main/openssl/crypto/dso/dso.h rename : openssl/crypto/dso/dso_dl.c => main/openssl/crypto/dso/dso_dl.c rename : openssl/crypto/dso/dso_dlfcn.c => main/openssl/crypto/dso/dso_dlfcn.c rename : openssl/crypto/dso/dso_err.c => main/openssl/crypto/dso/dso_err.c rename : openssl/crypto/dso/dso_lib.c => main/openssl/crypto/dso/dso_lib.c rename : openssl/crypto/dso/dso_null.c => main/openssl/crypto/dso/dso_null.c rename : openssl/crypto/dso/dso_openssl.c => main/openssl/crypto/dso/dso_openssl.c rename : openssl/crypto/ebcdic.c => main/openssl/crypto/ebcdic.c rename : openssl/crypto/ebcdic.h => main/openssl/crypto/ebcdic.h rename : openssl/crypto/ec/ec.h => main/openssl/crypto/ec/ec.h rename : openssl/crypto/ec/ec2_mult.c => main/openssl/crypto/ec/ec2_mult.c rename : openssl/crypto/ec/ec2_smpl.c => main/openssl/crypto/ec/ec2_smpl.c rename : openssl/crypto/ec/ec_ameth.c => main/openssl/crypto/ec/ec_ameth.c rename : openssl/crypto/ec/ec_asn1.c => main/openssl/crypto/ec/ec_asn1.c rename : openssl/crypto/ec/ec_check.c => main/openssl/crypto/ec/ec_check.c rename : openssl/crypto/ec/ec_curve.c => main/openssl/crypto/ec/ec_curve.c rename : openssl/crypto/ec/ec_cvt.c => main/openssl/crypto/ec/ec_cvt.c rename : openssl/crypto/ec/ec_err.c => main/openssl/crypto/ec/ec_err.c rename : openssl/crypto/ec/ec_key.c => main/openssl/crypto/ec/ec_key.c rename : openssl/crypto/ec/ec_lcl.h => main/openssl/crypto/ec/ec_lcl.h rename : openssl/crypto/ec/ec_lib.c => main/openssl/crypto/ec/ec_lib.c rename : openssl/crypto/ec/ec_mult.c => main/openssl/crypto/ec/ec_mult.c rename : openssl/crypto/ec/ec_pmeth.c => main/openssl/crypto/ec/ec_pmeth.c rename : openssl/crypto/ec/ec_print.c => main/openssl/crypto/ec/ec_print.c rename : openssl/crypto/ec/eck_prn.c => main/openssl/crypto/ec/eck_prn.c rename : openssl/crypto/ec/ecp_mont.c => main/openssl/crypto/ec/ecp_mont.c rename : openssl/crypto/ec/ecp_nist.c => main/openssl/crypto/ec/ecp_nist.c rename : openssl/crypto/ec/ecp_smpl.c => main/openssl/crypto/ec/ecp_smpl.c rename : openssl/crypto/ec/ectest.c => main/openssl/crypto/ec/ectest.c rename : openssl/crypto/ecdh/ecdh.h => main/openssl/crypto/ecdh/ecdh.h rename : openssl/crypto/ecdh/ecdhtest.c => main/openssl/crypto/ecdh/ecdhtest.c rename : openssl/crypto/ecdh/ech_err.c => main/openssl/crypto/ecdh/ech_err.c rename : openssl/crypto/ecdh/ech_key.c => main/openssl/crypto/ecdh/ech_key.c rename : openssl/crypto/ecdh/ech_lib.c => main/openssl/crypto/ecdh/ech_lib.c rename : openssl/crypto/ecdh/ech_locl.h => main/openssl/crypto/ecdh/ech_locl.h rename : openssl/crypto/ecdh/ech_ossl.c => main/openssl/crypto/ecdh/ech_ossl.c rename : openssl/crypto/ecdsa/ecdsa.h => main/openssl/crypto/ecdsa/ecdsa.h rename : openssl/crypto/ecdsa/ecdsatest.c => main/openssl/crypto/ecdsa/ecdsatest.c rename : openssl/crypto/ecdsa/ecs_asn1.c => main/openssl/crypto/ecdsa/ecs_asn1.c rename : openssl/crypto/ecdsa/ecs_err.c => main/openssl/crypto/ecdsa/ecs_err.c rename : openssl/crypto/ecdsa/ecs_lib.c => main/openssl/crypto/ecdsa/ecs_lib.c rename : openssl/crypto/ecdsa/ecs_locl.h => main/openssl/crypto/ecdsa/ecs_locl.h rename : openssl/crypto/ecdsa/ecs_ossl.c => main/openssl/crypto/ecdsa/ecs_ossl.c rename : openssl/crypto/ecdsa/ecs_sign.c => main/openssl/crypto/ecdsa/ecs_sign.c rename : openssl/crypto/ecdsa/ecs_vrf.c => main/openssl/crypto/ecdsa/ecs_vrf.c rename : openssl/crypto/engine/README => main/openssl/crypto/engine/README rename : openssl/crypto/engine/eng_all.c => main/openssl/crypto/engine/eng_all.c rename : openssl/crypto/engine/eng_cnf.c => main/openssl/crypto/engine/eng_cnf.c rename : openssl/crypto/engine/eng_cryptodev.c => main/openssl/crypto/engine/eng_cryptodev.c rename : openssl/crypto/engine/eng_ctrl.c => main/openssl/crypto/engine/eng_ctrl.c rename : openssl/crypto/engine/eng_dyn.c => main/openssl/crypto/engine/eng_dyn.c rename : openssl/crypto/engine/eng_err.c => main/openssl/crypto/engine/eng_err.c rename : openssl/crypto/engine/eng_fat.c => main/openssl/crypto/engine/eng_fat.c rename : openssl/crypto/engine/eng_init.c => main/openssl/crypto/engine/eng_init.c rename : openssl/crypto/engine/eng_int.h => main/openssl/crypto/engine/eng_int.h rename : openssl/crypto/engine/eng_lib.c => main/openssl/crypto/engine/eng_lib.c rename : openssl/crypto/engine/eng_list.c => main/openssl/crypto/engine/eng_list.c rename : openssl/crypto/engine/eng_openssl.c => main/openssl/crypto/engine/eng_openssl.c rename : openssl/crypto/engine/eng_pkey.c => main/openssl/crypto/engine/eng_pkey.c rename : openssl/crypto/engine/eng_table.c => main/openssl/crypto/engine/eng_table.c rename : openssl/crypto/engine/engine.h => main/openssl/crypto/engine/engine.h rename : openssl/crypto/engine/enginetest.c => main/openssl/crypto/engine/enginetest.c rename : openssl/crypto/engine/tb_cipher.c => main/openssl/crypto/engine/tb_cipher.c rename : openssl/crypto/engine/tb_dh.c => main/openssl/crypto/engine/tb_dh.c rename : openssl/crypto/engine/tb_digest.c => main/openssl/crypto/engine/tb_digest.c rename : openssl/crypto/engine/tb_dsa.c => main/openssl/crypto/engine/tb_dsa.c rename : openssl/crypto/engine/tb_ecdh.c => main/openssl/crypto/engine/tb_ecdh.c rename : openssl/crypto/engine/tb_ecdsa.c => main/openssl/crypto/engine/tb_ecdsa.c rename : openssl/crypto/engine/tb_rand.c => main/openssl/crypto/engine/tb_rand.c rename : openssl/crypto/engine/tb_rsa.c => main/openssl/crypto/engine/tb_rsa.c rename : openssl/crypto/engine/tb_store.c => main/openssl/crypto/engine/tb_store.c rename : openssl/crypto/err/err.c => main/openssl/crypto/err/err.c rename : openssl/crypto/err/err.h => main/openssl/crypto/err/err.h rename : openssl/crypto/err/err_all.c => main/openssl/crypto/err/err_all.c rename : openssl/crypto/err/err_prn.c => main/openssl/crypto/err/err_prn.c rename : openssl/crypto/err/openssl.ec => main/openssl/crypto/err/openssl.ec rename : openssl/crypto/evp/bio_b64.c => main/openssl/crypto/evp/bio_b64.c rename : openssl/crypto/evp/bio_enc.c => main/openssl/crypto/evp/bio_enc.c rename : openssl/crypto/evp/bio_md.c => main/openssl/crypto/evp/bio_md.c rename : openssl/crypto/evp/bio_ok.c => main/openssl/crypto/evp/bio_ok.c rename : openssl/crypto/evp/c_all.c => main/openssl/crypto/evp/c_all.c rename : openssl/crypto/evp/c_allc.c => main/openssl/crypto/evp/c_allc.c rename : openssl/crypto/evp/c_alld.c => main/openssl/crypto/evp/c_alld.c rename : openssl/crypto/evp/digest.c => main/openssl/crypto/evp/digest.c rename : openssl/crypto/evp/e_aes.c => main/openssl/crypto/evp/e_aes.c rename : openssl/crypto/evp/e_bf.c => main/openssl/crypto/evp/e_bf.c rename : openssl/crypto/evp/e_camellia.c => main/openssl/crypto/evp/e_camellia.c rename : openssl/crypto/evp/e_cast.c => main/openssl/crypto/evp/e_cast.c rename : openssl/crypto/evp/e_des.c => main/openssl/crypto/evp/e_des.c rename : openssl/crypto/evp/e_des3.c => main/openssl/crypto/evp/e_des3.c rename : openssl/crypto/evp/e_dsa.c => main/openssl/crypto/evp/e_dsa.c rename : openssl/crypto/evp/e_idea.c => main/openssl/crypto/evp/e_idea.c rename : openssl/crypto/evp/e_null.c => main/openssl/crypto/evp/e_null.c rename : openssl/crypto/evp/e_old.c => main/openssl/crypto/evp/e_old.c rename : openssl/crypto/evp/e_rc2.c => main/openssl/crypto/evp/e_rc2.c rename : openssl/crypto/evp/e_rc4.c => main/openssl/crypto/evp/e_rc4.c rename : openssl/crypto/evp/e_rc5.c => main/openssl/crypto/evp/e_rc5.c rename : openssl/crypto/evp/e_seed.c => main/openssl/crypto/evp/e_seed.c rename : openssl/crypto/evp/e_xcbc_d.c => main/openssl/crypto/evp/e_xcbc_d.c rename : openssl/crypto/evp/encode.c => main/openssl/crypto/evp/encode.c rename : openssl/crypto/evp/evp.h => main/openssl/crypto/evp/evp.h rename : openssl/crypto/evp/evp_acnf.c => main/openssl/crypto/evp/evp_acnf.c rename : openssl/crypto/evp/evp_enc.c => main/openssl/crypto/evp/evp_enc.c rename : openssl/crypto/evp/evp_err.c => main/openssl/crypto/evp/evp_err.c rename : openssl/crypto/evp/evp_key.c => main/openssl/crypto/evp/evp_key.c rename : openssl/crypto/evp/evp_lib.c => main/openssl/crypto/evp/evp_lib.c rename : openssl/crypto/evp/evp_locl.h => main/openssl/crypto/evp/evp_locl.h rename : openssl/crypto/evp/evp_pbe.c => main/openssl/crypto/evp/evp_pbe.c rename : openssl/crypto/evp/evp_pkey.c => main/openssl/crypto/evp/evp_pkey.c rename : openssl/crypto/evp/evp_test.c => main/openssl/crypto/evp/evp_test.c rename : openssl/crypto/evp/evptests.txt => main/openssl/crypto/evp/evptests.txt rename : openssl/crypto/evp/m_dss.c => main/openssl/crypto/evp/m_dss.c rename : openssl/crypto/evp/m_dss1.c => main/openssl/crypto/evp/m_dss1.c rename : openssl/crypto/evp/m_ecdsa.c => main/openssl/crypto/evp/m_ecdsa.c rename : openssl/crypto/evp/m_md4.c => main/openssl/crypto/evp/m_md4.c rename : openssl/crypto/evp/m_md5.c => main/openssl/crypto/evp/m_md5.c rename : openssl/crypto/evp/m_mdc2.c => main/openssl/crypto/evp/m_mdc2.c rename : openssl/crypto/evp/m_null.c => main/openssl/crypto/evp/m_null.c rename : openssl/crypto/evp/m_ripemd.c => main/openssl/crypto/evp/m_ripemd.c rename : openssl/crypto/evp/m_sha1.c => main/openssl/crypto/evp/m_sha1.c rename : openssl/crypto/evp/m_sigver.c => main/openssl/crypto/evp/m_sigver.c rename : openssl/crypto/evp/m_wp.c => main/openssl/crypto/evp/m_wp.c rename : openssl/crypto/evp/names.c => main/openssl/crypto/evp/names.c rename : openssl/crypto/evp/openbsd_hw.c => main/openssl/crypto/evp/openbsd_hw.c rename : openssl/crypto/evp/p5_crpt.c => main/openssl/crypto/evp/p5_crpt.c rename : openssl/crypto/evp/p5_crpt2.c => main/openssl/crypto/evp/p5_crpt2.c rename : openssl/crypto/evp/p_dec.c => main/openssl/crypto/evp/p_dec.c rename : openssl/crypto/evp/p_enc.c => main/openssl/crypto/evp/p_enc.c rename : openssl/crypto/evp/p_lib.c => main/openssl/crypto/evp/p_lib.c rename : openssl/crypto/evp/p_open.c => main/openssl/crypto/evp/p_open.c rename : openssl/crypto/evp/p_seal.c => main/openssl/crypto/evp/p_seal.c rename : openssl/crypto/evp/p_sign.c => main/openssl/crypto/evp/p_sign.c rename : openssl/crypto/evp/p_verify.c => main/openssl/crypto/evp/p_verify.c rename : openssl/crypto/evp/pmeth_fn.c => main/openssl/crypto/evp/pmeth_fn.c rename : openssl/crypto/evp/pmeth_gn.c => main/openssl/crypto/evp/pmeth_gn.c rename : openssl/crypto/evp/pmeth_lib.c => main/openssl/crypto/evp/pmeth_lib.c rename : openssl/crypto/ex_data.c => main/openssl/crypto/ex_data.c rename : openssl/crypto/hmac/hm_ameth.c => main/openssl/crypto/hmac/hm_ameth.c rename : openssl/crypto/hmac/hm_pmeth.c => main/openssl/crypto/hmac/hm_pmeth.c rename : openssl/crypto/hmac/hmac.c => main/openssl/crypto/hmac/hmac.c rename : openssl/crypto/hmac/hmac.h => main/openssl/crypto/hmac/hmac.h rename : openssl/crypto/hmac/hmactest.c => main/openssl/crypto/hmac/hmactest.c rename : openssl/crypto/ia64cpuid.S => main/openssl/crypto/ia64cpuid.S rename : openssl/crypto/jpake/jpake.c => main/openssl/crypto/jpake/jpake.c rename : openssl/crypto/jpake/jpake.h => main/openssl/crypto/jpake/jpake.h rename : openssl/crypto/jpake/jpake_err.c => main/openssl/crypto/jpake/jpake_err.c rename : openssl/crypto/jpake/jpaketest.c => main/openssl/crypto/jpake/jpaketest.c rename : openssl/crypto/krb5/krb5_asn.c => main/openssl/crypto/krb5/krb5_asn.c rename : openssl/crypto/krb5/krb5_asn.h => main/openssl/crypto/krb5/krb5_asn.h rename : openssl/crypto/lhash/lh_stats.c => main/openssl/crypto/lhash/lh_stats.c rename : openssl/crypto/lhash/lh_test.c => main/openssl/crypto/lhash/lh_test.c rename : openssl/crypto/lhash/lhash.c => main/openssl/crypto/lhash/lhash.c rename : openssl/crypto/lhash/lhash.h => main/openssl/crypto/lhash/lhash.h rename : openssl/crypto/lhash/num.pl => main/openssl/crypto/lhash/num.pl rename : openssl/crypto/md32_common.h => main/openssl/crypto/md32_common.h rename : openssl/crypto/md4/md4.c => main/openssl/crypto/md4/md4.c rename : openssl/crypto/md4/md4.h => main/openssl/crypto/md4/md4.h rename : openssl/crypto/md4/md4_dgst.c => main/openssl/crypto/md4/md4_dgst.c rename : openssl/crypto/md4/md4_locl.h => main/openssl/crypto/md4/md4_locl.h rename : openssl/crypto/md4/md4_one.c => main/openssl/crypto/md4/md4_one.c rename : openssl/crypto/md4/md4s.cpp => main/openssl/crypto/md4/md4s.cpp rename : openssl/crypto/md4/md4test.c => main/openssl/crypto/md4/md4test.c rename : openssl/crypto/md5/asm/md5-586.pl => main/openssl/crypto/md5/asm/md5-586.pl rename : openssl/crypto/md5/asm/md5-ia64.S => main/openssl/crypto/md5/asm/md5-ia64.S rename : openssl/crypto/md5/asm/md5-x86_64.pl => main/openssl/crypto/md5/asm/md5-x86_64.pl rename : openssl/crypto/md5/md5.c => main/openssl/crypto/md5/md5.c rename : openssl/crypto/md5/md5.h => main/openssl/crypto/md5/md5.h rename : openssl/crypto/md5/md5_dgst.c => main/openssl/crypto/md5/md5_dgst.c rename : openssl/crypto/md5/md5_locl.h => main/openssl/crypto/md5/md5_locl.h rename : openssl/crypto/md5/md5_one.c => main/openssl/crypto/md5/md5_one.c rename : openssl/crypto/md5/md5s.cpp => main/openssl/crypto/md5/md5s.cpp rename : openssl/crypto/md5/md5test.c => main/openssl/crypto/md5/md5test.c rename : openssl/crypto/mdc2/mdc2.h => main/openssl/crypto/mdc2/mdc2.h rename : openssl/crypto/mdc2/mdc2_one.c => main/openssl/crypto/mdc2/mdc2_one.c rename : openssl/crypto/mdc2/mdc2dgst.c => main/openssl/crypto/mdc2/mdc2dgst.c rename : openssl/crypto/mdc2/mdc2test.c => main/openssl/crypto/mdc2/mdc2test.c rename : openssl/crypto/mem.c => main/openssl/crypto/mem.c rename : openssl/crypto/mem_clr.c => main/openssl/crypto/mem_clr.c rename : openssl/crypto/mem_dbg.c => main/openssl/crypto/mem_dbg.c rename : openssl/crypto/modes/cbc128.c => main/openssl/crypto/modes/cbc128.c rename : openssl/crypto/modes/cfb128.c => main/openssl/crypto/modes/cfb128.c rename : openssl/crypto/modes/ctr128.c => main/openssl/crypto/modes/ctr128.c rename : openssl/crypto/modes/ofb128.c => main/openssl/crypto/modes/ofb128.c rename : openssl/crypto/o_dir.c => main/openssl/crypto/o_dir.c rename : openssl/crypto/o_dir.h => main/openssl/crypto/o_dir.h rename : openssl/crypto/o_dir_test.c => main/openssl/crypto/o_dir_test.c rename : openssl/crypto/o_str.c => main/openssl/crypto/o_str.c rename : openssl/crypto/o_str.h => main/openssl/crypto/o_str.h rename : openssl/crypto/o_time.c => main/openssl/crypto/o_time.c rename : openssl/crypto/o_time.h => main/openssl/crypto/o_time.h rename : openssl/crypto/objects/o_names.c => main/openssl/crypto/objects/o_names.c rename : openssl/crypto/objects/obj_dat.c => main/openssl/crypto/objects/obj_dat.c rename : openssl/crypto/objects/obj_dat.h => main/openssl/crypto/objects/obj_dat.h rename : openssl/crypto/objects/obj_dat.pl => main/openssl/crypto/objects/obj_dat.pl rename : openssl/crypto/objects/obj_err.c => main/openssl/crypto/objects/obj_err.c rename : openssl/crypto/objects/obj_lib.c => main/openssl/crypto/objects/obj_lib.c rename : openssl/crypto/objects/obj_mac.h => main/openssl/crypto/objects/obj_mac.h rename : openssl/crypto/objects/obj_mac.num => main/openssl/crypto/objects/obj_mac.num rename : openssl/crypto/objects/obj_xref.c => main/openssl/crypto/objects/obj_xref.c rename : openssl/crypto/objects/obj_xref.h => main/openssl/crypto/objects/obj_xref.h rename : openssl/crypto/objects/obj_xref.txt => main/openssl/crypto/objects/obj_xref.txt rename : openssl/crypto/objects/objects.README => main/openssl/crypto/objects/objects.README rename : openssl/crypto/objects/objects.h => main/openssl/crypto/objects/objects.h rename : openssl/crypto/objects/objects.pl => main/openssl/crypto/objects/objects.pl rename : openssl/crypto/objects/objects.txt => main/openssl/crypto/objects/objects.txt rename : openssl/crypto/objects/objxref.pl => main/openssl/crypto/objects/objxref.pl rename : openssl/crypto/ocsp/ocsp.h => main/openssl/crypto/ocsp/ocsp.h rename : openssl/crypto/ocsp/ocsp_asn.c => main/openssl/crypto/ocsp/ocsp_asn.c rename : openssl/crypto/ocsp/ocsp_cl.c => main/openssl/crypto/ocsp/ocsp_cl.c rename : openssl/crypto/ocsp/ocsp_err.c => main/openssl/crypto/ocsp/ocsp_err.c rename : openssl/crypto/ocsp/ocsp_ext.c => main/openssl/crypto/ocsp/ocsp_ext.c rename : openssl/crypto/ocsp/ocsp_ht.c => main/openssl/crypto/ocsp/ocsp_ht.c rename : openssl/crypto/ocsp/ocsp_lib.c => main/openssl/crypto/ocsp/ocsp_lib.c rename : openssl/crypto/ocsp/ocsp_prn.c => main/openssl/crypto/ocsp/ocsp_prn.c rename : openssl/crypto/ocsp/ocsp_srv.c => main/openssl/crypto/ocsp/ocsp_srv.c rename : openssl/crypto/ocsp/ocsp_vfy.c => main/openssl/crypto/ocsp/ocsp_vfy.c rename : openssl/crypto/opensslconf.h => main/openssl/crypto/opensslconf.h rename : openssl/crypto/opensslconf.h.in => main/openssl/crypto/opensslconf.h.in rename : openssl/crypto/opensslv.h => main/openssl/crypto/opensslv.h rename : openssl/crypto/ossl_typ.h => main/openssl/crypto/ossl_typ.h rename : openssl/crypto/pem/message => main/openssl/crypto/pem/message rename : openssl/crypto/pem/pem.h => main/openssl/crypto/pem/pem.h rename : openssl/crypto/pem/pem2.h => main/openssl/crypto/pem/pem2.h rename : openssl/crypto/pem/pem_all.c => main/openssl/crypto/pem/pem_all.c rename : openssl/crypto/pem/pem_err.c => main/openssl/crypto/pem/pem_err.c rename : openssl/crypto/pem/pem_info.c => main/openssl/crypto/pem/pem_info.c rename : openssl/crypto/pem/pem_lib.c => main/openssl/crypto/pem/pem_lib.c rename : openssl/crypto/pem/pem_oth.c => main/openssl/crypto/pem/pem_oth.c rename : openssl/crypto/pem/pem_pk8.c => main/openssl/crypto/pem/pem_pk8.c rename : openssl/crypto/pem/pem_pkey.c => main/openssl/crypto/pem/pem_pkey.c rename : openssl/crypto/pem/pem_seal.c => main/openssl/crypto/pem/pem_seal.c rename : openssl/crypto/pem/pem_sign.c => main/openssl/crypto/pem/pem_sign.c rename : openssl/crypto/pem/pem_x509.c => main/openssl/crypto/pem/pem_x509.c rename : openssl/crypto/pem/pem_xaux.c => main/openssl/crypto/pem/pem_xaux.c rename : openssl/crypto/pem/pkcs7.lis => main/openssl/crypto/pem/pkcs7.lis rename : openssl/crypto/pem/pvkfmt.c => main/openssl/crypto/pem/pvkfmt.c rename : openssl/crypto/perlasm/cbc.pl => main/openssl/crypto/perlasm/cbc.pl rename : openssl/crypto/perlasm/ppc-xlate.pl => main/openssl/crypto/perlasm/ppc-xlate.pl rename : openssl/crypto/perlasm/readme => main/openssl/crypto/perlasm/readme rename : openssl/crypto/perlasm/x86_64-xlate.pl => main/openssl/crypto/perlasm/x86_64-xlate.pl rename : openssl/crypto/perlasm/x86asm.pl => main/openssl/crypto/perlasm/x86asm.pl rename : openssl/crypto/perlasm/x86gas.pl => main/openssl/crypto/perlasm/x86gas.pl rename : openssl/crypto/perlasm/x86masm.pl => main/openssl/crypto/perlasm/x86masm.pl rename : openssl/crypto/perlasm/x86nasm.pl => main/openssl/crypto/perlasm/x86nasm.pl rename : openssl/crypto/pkcs12/p12_add.c => main/openssl/crypto/pkcs12/p12_add.c rename : openssl/crypto/pkcs12/p12_asn.c => main/openssl/crypto/pkcs12/p12_asn.c rename : openssl/crypto/pkcs12/p12_attr.c => main/openssl/crypto/pkcs12/p12_attr.c rename : openssl/crypto/pkcs12/p12_crpt.c => main/openssl/crypto/pkcs12/p12_crpt.c rename : openssl/crypto/pkcs12/p12_crt.c => main/openssl/crypto/pkcs12/p12_crt.c rename : openssl/crypto/pkcs12/p12_decr.c => main/openssl/crypto/pkcs12/p12_decr.c rename : openssl/crypto/pkcs12/p12_init.c => main/openssl/crypto/pkcs12/p12_init.c rename : openssl/crypto/pkcs12/p12_key.c => main/openssl/crypto/pkcs12/p12_key.c rename : openssl/crypto/pkcs12/p12_kiss.c => main/openssl/crypto/pkcs12/p12_kiss.c rename : openssl/crypto/pkcs12/p12_mutl.c => main/openssl/crypto/pkcs12/p12_mutl.c rename : openssl/crypto/pkcs12/p12_npas.c => main/openssl/crypto/pkcs12/p12_npas.c rename : openssl/crypto/pkcs12/p12_p8d.c => main/openssl/crypto/pkcs12/p12_p8d.c rename : openssl/crypto/pkcs12/p12_p8e.c => main/openssl/crypto/pkcs12/p12_p8e.c rename : openssl/crypto/pkcs12/p12_utl.c => main/openssl/crypto/pkcs12/p12_utl.c rename : openssl/crypto/pkcs12/pk12err.c => main/openssl/crypto/pkcs12/pk12err.c rename : openssl/crypto/pkcs12/pkcs12.h => main/openssl/crypto/pkcs12/pkcs12.h rename : openssl/crypto/pkcs7/bio_ber.c => main/openssl/crypto/pkcs7/bio_ber.c rename : openssl/crypto/pkcs7/dec.c => main/openssl/crypto/pkcs7/dec.c rename : openssl/crypto/pkcs7/des.pem => main/openssl/crypto/pkcs7/des.pem rename : openssl/crypto/pkcs7/doc => main/openssl/crypto/pkcs7/doc rename : openssl/crypto/pkcs7/enc.c => main/openssl/crypto/pkcs7/enc.c rename : openssl/crypto/pkcs7/es1.pem => main/openssl/crypto/pkcs7/es1.pem rename : openssl/crypto/pkcs7/example.c => main/openssl/crypto/pkcs7/example.c rename : openssl/crypto/pkcs7/example.h => main/openssl/crypto/pkcs7/example.h rename : openssl/crypto/pkcs7/info.pem => main/openssl/crypto/pkcs7/info.pem rename : openssl/crypto/pkcs7/infokey.pem => main/openssl/crypto/pkcs7/infokey.pem rename : openssl/crypto/pkcs7/p7/a1 => main/openssl/crypto/pkcs7/p7/a1 rename : openssl/crypto/pkcs7/p7/a2 => main/openssl/crypto/pkcs7/p7/a2 rename : openssl/crypto/pkcs7/p7/cert.p7c => main/openssl/crypto/pkcs7/p7/cert.p7c rename : openssl/crypto/pkcs7/p7/smime.p7m => main/openssl/crypto/pkcs7/p7/smime.p7m rename : openssl/crypto/pkcs7/p7/smime.p7s => main/openssl/crypto/pkcs7/p7/smime.p7s rename : openssl/crypto/pkcs7/pk7_asn1.c => main/openssl/crypto/pkcs7/pk7_asn1.c rename : openssl/crypto/pkcs7/pk7_attr.c => main/openssl/crypto/pkcs7/pk7_attr.c rename : openssl/crypto/pkcs7/pk7_dgst.c => main/openssl/crypto/pkcs7/pk7_dgst.c rename : openssl/crypto/pkcs7/pk7_doit.c => main/openssl/crypto/pkcs7/pk7_doit.c rename : openssl/crypto/pkcs7/pk7_enc.c => main/openssl/crypto/pkcs7/pk7_enc.c rename : openssl/crypto/pkcs7/pk7_lib.c => main/openssl/crypto/pkcs7/pk7_lib.c rename : openssl/crypto/pkcs7/pk7_mime.c => main/openssl/crypto/pkcs7/pk7_mime.c rename : openssl/crypto/pkcs7/pk7_smime.c => main/openssl/crypto/pkcs7/pk7_smime.c rename : openssl/crypto/pkcs7/pkcs7.h => main/openssl/crypto/pkcs7/pkcs7.h rename : openssl/crypto/pkcs7/pkcs7err.c => main/openssl/crypto/pkcs7/pkcs7err.c rename : openssl/crypto/pkcs7/server.pem => main/openssl/crypto/pkcs7/server.pem rename : openssl/crypto/pkcs7/sign.c => main/openssl/crypto/pkcs7/sign.c rename : openssl/crypto/pkcs7/t/3des.pem => main/openssl/crypto/pkcs7/t/3des.pem rename : openssl/crypto/pkcs7/t/3dess.pem => main/openssl/crypto/pkcs7/t/3dess.pem rename : openssl/crypto/pkcs7/t/c.pem => main/openssl/crypto/pkcs7/t/c.pem rename : openssl/crypto/pkcs7/t/ff => main/openssl/crypto/pkcs7/t/ff rename : openssl/crypto/pkcs7/t/msie-e => main/openssl/crypto/pkcs7/t/msie-e rename : openssl/crypto/pkcs7/t/msie-e.pem => main/openssl/crypto/pkcs7/t/msie-e.pem rename : openssl/crypto/pkcs7/t/msie-enc-01 => main/openssl/crypto/pkcs7/t/msie-enc-01 rename : openssl/crypto/pkcs7/t/msie-enc-01.pem => main/openssl/crypto/pkcs7/t/msie-enc-01.pem rename : openssl/crypto/pkcs7/t/msie-enc-02 => main/openssl/crypto/pkcs7/t/msie-enc-02 rename : openssl/crypto/pkcs7/t/msie-enc-02.pem => main/openssl/crypto/pkcs7/t/msie-enc-02.pem rename : openssl/crypto/pkcs7/t/msie-s-a-e => main/openssl/crypto/pkcs7/t/msie-s-a-e rename : openssl/crypto/pkcs7/t/msie-s-a-e.pem => main/openssl/crypto/pkcs7/t/msie-s-a-e.pem rename : openssl/crypto/pkcs7/t/nav-smime => main/openssl/crypto/pkcs7/t/nav-smime rename : openssl/crypto/pkcs7/t/s.pem => main/openssl/crypto/pkcs7/t/s.pem rename : openssl/crypto/pkcs7/t/server.pem => main/openssl/crypto/pkcs7/t/server.pem rename : openssl/crypto/pkcs7/verify.c => main/openssl/crypto/pkcs7/verify.c rename : openssl/crypto/ppccpuid.pl => main/openssl/crypto/ppccpuid.pl rename : openssl/crypto/pqueue/pq_test.c => main/openssl/crypto/pqueue/pq_test.c rename : openssl/crypto/pqueue/pqueue.c => main/openssl/crypto/pqueue/pqueue.c rename : openssl/crypto/pqueue/pqueue.h => main/openssl/crypto/pqueue/pqueue.h rename : openssl/crypto/rand/md_rand.c => main/openssl/crypto/rand/md_rand.c rename : openssl/crypto/rand/rand.h => main/openssl/crypto/rand/rand.h rename : openssl/crypto/rand/rand_egd.c => main/openssl/crypto/rand/rand_egd.c rename : openssl/crypto/rand/rand_err.c => main/openssl/crypto/rand/rand_err.c rename : openssl/crypto/rand/rand_lcl.h => main/openssl/crypto/rand/rand_lcl.h rename : openssl/crypto/rand/rand_lib.c => main/openssl/crypto/rand/rand_lib.c rename : openssl/crypto/rand/rand_nw.c => main/openssl/crypto/rand/rand_nw.c rename : openssl/crypto/rand/rand_os2.c => main/openssl/crypto/rand/rand_os2.c rename : openssl/crypto/rand/rand_unix.c => main/openssl/crypto/rand/rand_unix.c rename : openssl/crypto/rand/rand_win.c => main/openssl/crypto/rand/rand_win.c rename : openssl/crypto/rand/randfile.c => main/openssl/crypto/rand/randfile.c rename : openssl/crypto/rand/randtest.c => main/openssl/crypto/rand/randtest.c rename : openssl/crypto/rc2/rc2.h => main/openssl/crypto/rc2/rc2.h rename : openssl/crypto/rc2/rc2_cbc.c => main/openssl/crypto/rc2/rc2_cbc.c rename : openssl/crypto/rc2/rc2_ecb.c => main/openssl/crypto/rc2/rc2_ecb.c rename : openssl/crypto/rc2/rc2_locl.h => main/openssl/crypto/rc2/rc2_locl.h rename : openssl/crypto/rc2/rc2_skey.c => main/openssl/crypto/rc2/rc2_skey.c rename : openssl/crypto/rc2/rc2cfb64.c => main/openssl/crypto/rc2/rc2cfb64.c rename : openssl/crypto/rc2/rc2ofb64.c => main/openssl/crypto/rc2/rc2ofb64.c rename : openssl/crypto/rc2/rc2speed.c => main/openssl/crypto/rc2/rc2speed.c rename : openssl/crypto/rc2/rc2test.c => main/openssl/crypto/rc2/rc2test.c rename : openssl/crypto/rc2/rrc2.doc => main/openssl/crypto/rc2/rrc2.doc rename : openssl/crypto/rc2/tab.c => main/openssl/crypto/rc2/tab.c rename : openssl/crypto/rc2/version => main/openssl/crypto/rc2/version rename : openssl/crypto/rc4/asm/rc4-586.pl => main/openssl/crypto/rc4/asm/rc4-586.pl rename : openssl/crypto/rc4/asm/rc4-ia64.pl => main/openssl/crypto/rc4/asm/rc4-ia64.pl rename : openssl/crypto/rc4/asm/rc4-s390x.pl => main/openssl/crypto/rc4/asm/rc4-s390x.pl rename : openssl/crypto/rc4/asm/rc4-x86_64.pl => main/openssl/crypto/rc4/asm/rc4-x86_64.pl rename : openssl/crypto/rc4/rc4.c => main/openssl/crypto/rc4/rc4.c rename : openssl/crypto/rc4/rc4.h => main/openssl/crypto/rc4/rc4.h rename : openssl/crypto/rc4/rc4_enc.c => main/openssl/crypto/rc4/rc4_enc.c rename : openssl/crypto/rc4/rc4_locl.h => main/openssl/crypto/rc4/rc4_locl.h rename : openssl/crypto/rc4/rc4_skey.c => main/openssl/crypto/rc4/rc4_skey.c rename : openssl/crypto/rc4/rc4s.cpp => main/openssl/crypto/rc4/rc4s.cpp rename : openssl/crypto/rc4/rc4speed.c => main/openssl/crypto/rc4/rc4speed.c rename : openssl/crypto/rc4/rc4test.c => main/openssl/crypto/rc4/rc4test.c rename : openssl/crypto/rc4/rrc4.doc => main/openssl/crypto/rc4/rrc4.doc rename : openssl/crypto/ripemd/README => main/openssl/crypto/ripemd/README rename : openssl/crypto/ripemd/asm/rips.cpp => main/openssl/crypto/ripemd/asm/rips.cpp rename : openssl/crypto/ripemd/asm/rmd-586.pl => main/openssl/crypto/ripemd/asm/rmd-586.pl rename : openssl/crypto/ripemd/ripemd.h => main/openssl/crypto/ripemd/ripemd.h rename : openssl/crypto/ripemd/rmd160.c => main/openssl/crypto/ripemd/rmd160.c rename : openssl/crypto/ripemd/rmd_dgst.c => main/openssl/crypto/ripemd/rmd_dgst.c rename : openssl/crypto/ripemd/rmd_locl.h => main/openssl/crypto/ripemd/rmd_locl.h rename : openssl/crypto/ripemd/rmd_one.c => main/openssl/crypto/ripemd/rmd_one.c rename : openssl/crypto/ripemd/rmdconst.h => main/openssl/crypto/ripemd/rmdconst.h rename : openssl/crypto/ripemd/rmdtest.c => main/openssl/crypto/ripemd/rmdtest.c rename : openssl/crypto/rsa/rsa.h => main/openssl/crypto/rsa/rsa.h rename : openssl/crypto/rsa/rsa_ameth.c => main/openssl/crypto/rsa/rsa_ameth.c rename : openssl/crypto/rsa/rsa_asn1.c => main/openssl/crypto/rsa/rsa_asn1.c rename : openssl/crypto/rsa/rsa_chk.c => main/openssl/crypto/rsa/rsa_chk.c rename : openssl/crypto/rsa/rsa_depr.c => main/openssl/crypto/rsa/rsa_depr.c rename : openssl/crypto/rsa/rsa_eay.c => main/openssl/crypto/rsa/rsa_eay.c rename : openssl/crypto/rsa/rsa_err.c => main/openssl/crypto/rsa/rsa_err.c rename : openssl/crypto/rsa/rsa_gen.c => main/openssl/crypto/rsa/rsa_gen.c rename : openssl/crypto/rsa/rsa_lib.c => main/openssl/crypto/rsa/rsa_lib.c rename : openssl/crypto/rsa/rsa_locl.h => main/openssl/crypto/rsa/rsa_locl.h rename : openssl/crypto/rsa/rsa_none.c => main/openssl/crypto/rsa/rsa_none.c rename : openssl/crypto/rsa/rsa_null.c => main/openssl/crypto/rsa/rsa_null.c rename : openssl/crypto/rsa/rsa_oaep.c => main/openssl/crypto/rsa/rsa_oaep.c rename : openssl/crypto/rsa/rsa_pk1.c => main/openssl/crypto/rsa/rsa_pk1.c rename : openssl/crypto/rsa/rsa_pmeth.c => main/openssl/crypto/rsa/rsa_pmeth.c rename : openssl/crypto/rsa/rsa_prn.c => main/openssl/crypto/rsa/rsa_prn.c rename : openssl/crypto/rsa/rsa_pss.c => main/openssl/crypto/rsa/rsa_pss.c rename : openssl/crypto/rsa/rsa_saos.c => main/openssl/crypto/rsa/rsa_saos.c rename : openssl/crypto/rsa/rsa_sign.c => main/openssl/crypto/rsa/rsa_sign.c rename : openssl/crypto/rsa/rsa_ssl.c => main/openssl/crypto/rsa/rsa_ssl.c rename : openssl/crypto/rsa/rsa_test.c => main/openssl/crypto/rsa/rsa_test.c rename : openssl/crypto/rsa/rsa_x931.c => main/openssl/crypto/rsa/rsa_x931.c rename : openssl/crypto/s390xcap.c => main/openssl/crypto/s390xcap.c rename : openssl/crypto/s390xcpuid.S => main/openssl/crypto/s390xcpuid.S rename : openssl/crypto/sha/asm/README => main/openssl/crypto/sha/asm/README rename : openssl/crypto/sha/asm/sha1-586.pl => main/openssl/crypto/sha/asm/sha1-586.pl rename : openssl/crypto/sha/asm/sha1-armv4-large.pl => main/openssl/crypto/sha/asm/sha1-armv4-large.pl rename : openssl/crypto/sha/asm/sha1-armv4-large.s => main/openssl/crypto/sha/asm/sha1-armv4-large.s rename : openssl/crypto/sha/asm/sha1-ia64.pl => main/openssl/crypto/sha/asm/sha1-ia64.pl rename : openssl/crypto/sha/asm/sha1-ppc.pl => main/openssl/crypto/sha/asm/sha1-ppc.pl rename : openssl/crypto/sha/asm/sha1-s390x.pl => main/openssl/crypto/sha/asm/sha1-s390x.pl rename : openssl/crypto/sha/asm/sha1-sparcv9.pl => main/openssl/crypto/sha/asm/sha1-sparcv9.pl rename : openssl/crypto/sha/asm/sha1-sparcv9a.pl => main/openssl/crypto/sha/asm/sha1-sparcv9a.pl rename : openssl/crypto/sha/asm/sha1-thumb.pl => main/openssl/crypto/sha/asm/sha1-thumb.pl rename : openssl/crypto/sha/asm/sha1-x86_64.pl => main/openssl/crypto/sha/asm/sha1-x86_64.pl rename : openssl/crypto/sha/asm/sha256-586.pl => main/openssl/crypto/sha/asm/sha256-586.pl rename : openssl/crypto/sha/asm/sha256-armv4.pl => main/openssl/crypto/sha/asm/sha256-armv4.pl rename : openssl/crypto/sha/asm/sha256-armv4.s => main/openssl/crypto/sha/asm/sha256-armv4.s rename : openssl/crypto/sha/asm/sha512-586.pl => main/openssl/crypto/sha/asm/sha512-586.pl rename : openssl/crypto/sha/asm/sha512-armv4.pl => main/openssl/crypto/sha/asm/sha512-armv4.pl rename : openssl/crypto/sha/asm/sha512-armv4.s => main/openssl/crypto/sha/asm/sha512-armv4.s rename : openssl/crypto/sha/asm/sha512-ia64.pl => main/openssl/crypto/sha/asm/sha512-ia64.pl rename : openssl/crypto/sha/asm/sha512-ppc.pl => main/openssl/crypto/sha/asm/sha512-ppc.pl rename : openssl/crypto/sha/asm/sha512-s390x.pl => main/openssl/crypto/sha/asm/sha512-s390x.pl rename : openssl/crypto/sha/asm/sha512-sparcv9.pl => main/openssl/crypto/sha/asm/sha512-sparcv9.pl rename : openssl/crypto/sha/asm/sha512-x86_64.pl => main/openssl/crypto/sha/asm/sha512-x86_64.pl rename : openssl/crypto/sha/sha.c => main/openssl/crypto/sha/sha.c rename : openssl/crypto/sha/sha.h => main/openssl/crypto/sha/sha.h rename : openssl/crypto/sha/sha1.c => main/openssl/crypto/sha/sha1.c rename : openssl/crypto/sha/sha1_one.c => main/openssl/crypto/sha/sha1_one.c rename : openssl/crypto/sha/sha1dgst.c => main/openssl/crypto/sha/sha1dgst.c rename : openssl/crypto/sha/sha1test.c => main/openssl/crypto/sha/sha1test.c rename : openssl/crypto/sha/sha256.c => main/openssl/crypto/sha/sha256.c rename : openssl/crypto/sha/sha256t.c => main/openssl/crypto/sha/sha256t.c rename : openssl/crypto/sha/sha512.c => main/openssl/crypto/sha/sha512.c rename : openssl/crypto/sha/sha512t.c => main/openssl/crypto/sha/sha512t.c rename : openssl/crypto/sha/sha_dgst.c => main/openssl/crypto/sha/sha_dgst.c rename : openssl/crypto/sha/sha_locl.h => main/openssl/crypto/sha/sha_locl.h rename : openssl/crypto/sha/shatest.c => main/openssl/crypto/sha/shatest.c rename : openssl/crypto/sparccpuid.S => main/openssl/crypto/sparccpuid.S rename : openssl/crypto/sparcv9cap.c => main/openssl/crypto/sparcv9cap.c rename : openssl/crypto/stack/safestack.h => main/openssl/crypto/stack/safestack.h rename : openssl/crypto/stack/stack.c => main/openssl/crypto/stack/stack.c rename : openssl/crypto/stack/stack.h => main/openssl/crypto/stack/stack.h rename : openssl/crypto/store/README => main/openssl/crypto/store/README rename : openssl/crypto/store/store.h => main/openssl/crypto/store/store.h rename : openssl/crypto/store/str_err.c => main/openssl/crypto/store/str_err.c rename : openssl/crypto/store/str_lib.c => main/openssl/crypto/store/str_lib.c rename : openssl/crypto/store/str_locl.h => main/openssl/crypto/store/str_locl.h rename : openssl/crypto/store/str_mem.c => main/openssl/crypto/store/str_mem.c rename : openssl/crypto/store/str_meth.c => main/openssl/crypto/store/str_meth.c rename : openssl/crypto/symhacks.h => main/openssl/crypto/symhacks.h rename : openssl/crypto/threads/README => main/openssl/crypto/threads/README rename : openssl/crypto/threads/mttest.c => main/openssl/crypto/threads/mttest.c rename : openssl/crypto/threads/netware.bat => main/openssl/crypto/threads/netware.bat rename : openssl/crypto/threads/profile.sh => main/openssl/crypto/threads/profile.sh rename : openssl/crypto/threads/ptest.bat => main/openssl/crypto/threads/ptest.bat rename : openssl/crypto/threads/pthread.sh => main/openssl/crypto/threads/pthread.sh rename : openssl/crypto/threads/pthread2.sh => main/openssl/crypto/threads/pthread2.sh rename : openssl/crypto/threads/purify.sh => main/openssl/crypto/threads/purify.sh rename : openssl/crypto/threads/solaris.sh => main/openssl/crypto/threads/solaris.sh rename : openssl/crypto/threads/th-lock.c => main/openssl/crypto/threads/th-lock.c rename : openssl/crypto/ts/ts_err.c => main/openssl/crypto/ts/ts_err.c rename : openssl/crypto/txt_db/txt_db.c => main/openssl/crypto/txt_db/txt_db.c rename : openssl/crypto/txt_db/txt_db.h => main/openssl/crypto/txt_db/txt_db.h rename : openssl/crypto/ui/ui.h => main/openssl/crypto/ui/ui.h rename : openssl/crypto/ui/ui_compat.c => main/openssl/crypto/ui/ui_compat.c rename : openssl/crypto/ui/ui_compat.h => main/openssl/crypto/ui/ui_compat.h rename : openssl/crypto/ui/ui_err.c => main/openssl/crypto/ui/ui_err.c rename : openssl/crypto/ui/ui_lib.c => main/openssl/crypto/ui/ui_lib.c rename : openssl/crypto/ui/ui_locl.h => main/openssl/crypto/ui/ui_locl.h rename : openssl/crypto/ui/ui_openssl.c => main/openssl/crypto/ui/ui_openssl.c rename : openssl/crypto/ui/ui_util.c => main/openssl/crypto/ui/ui_util.c rename : openssl/crypto/uid.c => main/openssl/crypto/uid.c rename : openssl/crypto/x509/by_dir.c => main/openssl/crypto/x509/by_dir.c rename : openssl/crypto/x509/by_file.c => main/openssl/crypto/x509/by_file.c rename : openssl/crypto/x509/x509.h => main/openssl/crypto/x509/x509.h rename : openssl/crypto/x509/x509_att.c => main/openssl/crypto/x509/x509_att.c rename : openssl/crypto/x509/x509_cmp.c => main/openssl/crypto/x509/x509_cmp.c rename : openssl/crypto/x509/x509_d2.c => main/openssl/crypto/x509/x509_d2.c rename : openssl/crypto/x509/x509_def.c => main/openssl/crypto/x509/x509_def.c rename : openssl/crypto/x509/x509_err.c => main/openssl/crypto/x509/x509_err.c rename : openssl/crypto/x509/x509_ext.c => main/openssl/crypto/x509/x509_ext.c rename : openssl/crypto/x509/x509_lu.c => main/openssl/crypto/x509/x509_lu.c rename : openssl/crypto/x509/x509_obj.c => main/openssl/crypto/x509/x509_obj.c rename : openssl/crypto/x509/x509_r2x.c => main/openssl/crypto/x509/x509_r2x.c rename : openssl/crypto/x509/x509_req.c => main/openssl/crypto/x509/x509_req.c rename : openssl/crypto/x509/x509_set.c => main/openssl/crypto/x509/x509_set.c rename : openssl/crypto/x509/x509_trs.c => main/openssl/crypto/x509/x509_trs.c rename : openssl/crypto/x509/x509_txt.c => main/openssl/crypto/x509/x509_txt.c rename : openssl/crypto/x509/x509_v3.c => main/openssl/crypto/x509/x509_v3.c rename : openssl/crypto/x509/x509_vfy.c => main/openssl/crypto/x509/x509_vfy.c rename : openssl/crypto/x509/x509_vfy.h => main/openssl/crypto/x509/x509_vfy.h rename : openssl/crypto/x509/x509_vpm.c => main/openssl/crypto/x509/x509_vpm.c rename : openssl/crypto/x509/x509cset.c => main/openssl/crypto/x509/x509cset.c rename : openssl/crypto/x509/x509name.c => main/openssl/crypto/x509/x509name.c rename : openssl/crypto/x509/x509rset.c => main/openssl/crypto/x509/x509rset.c rename : openssl/crypto/x509/x509spki.c => main/openssl/crypto/x509/x509spki.c rename : openssl/crypto/x509/x509type.c => main/openssl/crypto/x509/x509type.c rename : openssl/crypto/x509/x_all.c => main/openssl/crypto/x509/x_all.c rename : openssl/crypto/x509v3/ext_dat.h => main/openssl/crypto/x509v3/ext_dat.h rename : openssl/crypto/x509v3/pcy_cache.c => main/openssl/crypto/x509v3/pcy_cache.c rename : openssl/crypto/x509v3/pcy_data.c => main/openssl/crypto/x509v3/pcy_data.c rename : openssl/crypto/x509v3/pcy_int.h => main/openssl/crypto/x509v3/pcy_int.h rename : openssl/crypto/x509v3/pcy_lib.c => main/openssl/crypto/x509v3/pcy_lib.c rename : openssl/crypto/x509v3/pcy_map.c => main/openssl/crypto/x509v3/pcy_map.c rename : openssl/crypto/x509v3/pcy_node.c => main/openssl/crypto/x509v3/pcy_node.c rename : openssl/crypto/x509v3/pcy_tree.c => main/openssl/crypto/x509v3/pcy_tree.c rename : openssl/crypto/x509v3/tabtest.c => main/openssl/crypto/x509v3/tabtest.c rename : openssl/crypto/x509v3/v3_addr.c => main/openssl/crypto/x509v3/v3_addr.c rename : openssl/crypto/x509v3/v3_akey.c => main/openssl/crypto/x509v3/v3_akey.c rename : openssl/crypto/x509v3/v3_akeya.c => main/openssl/crypto/x509v3/v3_akeya.c rename : openssl/crypto/x509v3/v3_alt.c => main/openssl/crypto/x509v3/v3_alt.c rename : openssl/crypto/x509v3/v3_asid.c => main/openssl/crypto/x509v3/v3_asid.c rename : openssl/crypto/x509v3/v3_bcons.c => main/openssl/crypto/x509v3/v3_bcons.c rename : openssl/crypto/x509v3/v3_bitst.c => main/openssl/crypto/x509v3/v3_bitst.c rename : openssl/crypto/x509v3/v3_conf.c => main/openssl/crypto/x509v3/v3_conf.c rename : openssl/crypto/x509v3/v3_cpols.c => main/openssl/crypto/x509v3/v3_cpols.c rename : openssl/crypto/x509v3/v3_crld.c => main/openssl/crypto/x509v3/v3_crld.c rename : openssl/crypto/x509v3/v3_enum.c => main/openssl/crypto/x509v3/v3_enum.c rename : openssl/crypto/x509v3/v3_extku.c => main/openssl/crypto/x509v3/v3_extku.c rename : openssl/crypto/x509v3/v3_genn.c => main/openssl/crypto/x509v3/v3_genn.c rename : openssl/crypto/x509v3/v3_ia5.c => main/openssl/crypto/x509v3/v3_ia5.c rename : openssl/crypto/x509v3/v3_info.c => main/openssl/crypto/x509v3/v3_info.c rename : openssl/crypto/x509v3/v3_int.c => main/openssl/crypto/x509v3/v3_int.c rename : openssl/crypto/x509v3/v3_lib.c => main/openssl/crypto/x509v3/v3_lib.c rename : openssl/crypto/x509v3/v3_ncons.c => main/openssl/crypto/x509v3/v3_ncons.c rename : openssl/crypto/x509v3/v3_ocsp.c => main/openssl/crypto/x509v3/v3_ocsp.c rename : openssl/crypto/x509v3/v3_pci.c => main/openssl/crypto/x509v3/v3_pci.c rename : openssl/crypto/x509v3/v3_pcia.c => main/openssl/crypto/x509v3/v3_pcia.c rename : openssl/crypto/x509v3/v3_pcons.c => main/openssl/crypto/x509v3/v3_pcons.c rename : openssl/crypto/x509v3/v3_pku.c => main/openssl/crypto/x509v3/v3_pku.c rename : openssl/crypto/x509v3/v3_pmaps.c => main/openssl/crypto/x509v3/v3_pmaps.c rename : openssl/crypto/x509v3/v3_prn.c => main/openssl/crypto/x509v3/v3_prn.c rename : openssl/crypto/x509v3/v3_purp.c => main/openssl/crypto/x509v3/v3_purp.c rename : openssl/crypto/x509v3/v3_skey.c => main/openssl/crypto/x509v3/v3_skey.c rename : openssl/crypto/x509v3/v3_sxnet.c => main/openssl/crypto/x509v3/v3_sxnet.c rename : openssl/crypto/x509v3/v3_utl.c => main/openssl/crypto/x509v3/v3_utl.c rename : openssl/crypto/x509v3/v3conf.c => main/openssl/crypto/x509v3/v3conf.c rename : openssl/crypto/x509v3/v3err.c => main/openssl/crypto/x509v3/v3err.c rename : openssl/crypto/x509v3/v3prin.c => main/openssl/crypto/x509v3/v3prin.c rename : openssl/crypto/x509v3/x509v3.h => main/openssl/crypto/x509v3/x509v3.h rename : openssl/crypto/x86_64cpuid.pl => main/openssl/crypto/x86_64cpuid.pl rename : openssl/crypto/x86cpuid.pl => main/openssl/crypto/x86cpuid.pl rename : openssl/e_os.h => main/openssl/e_os.h rename : openssl/e_os2.h => main/openssl/e_os2.h rename : openssl/import_openssl.sh => main/openssl/import_openssl.sh rename : openssl/include/openssl/aes.h => main/openssl/include/openssl/aes.h rename : openssl/include/openssl/asn1.h => main/openssl/include/openssl/asn1.h rename : openssl/include/openssl/asn1_mac.h => main/openssl/include/openssl/asn1_mac.h rename : openssl/include/openssl/asn1t.h => main/openssl/include/openssl/asn1t.h rename : openssl/include/openssl/bio.h => main/openssl/include/openssl/bio.h rename : openssl/include/openssl/blowfish.h => main/openssl/include/openssl/blowfish.h rename : openssl/include/openssl/bn.h => main/openssl/include/openssl/bn.h rename : openssl/include/openssl/buffer.h => main/openssl/include/openssl/buffer.h rename : openssl/include/openssl/comp.h => main/openssl/include/openssl/comp.h rename : openssl/include/openssl/conf.h => main/openssl/include/openssl/conf.h rename : openssl/include/openssl/conf_api.h => main/openssl/include/openssl/conf_api.h rename : openssl/include/openssl/crypto.h => main/openssl/include/openssl/crypto.h rename : openssl/include/openssl/des.h => main/openssl/include/openssl/des.h rename : openssl/include/openssl/des_old.h => main/openssl/include/openssl/des_old.h rename : openssl/include/openssl/dh.h => main/openssl/include/openssl/dh.h rename : openssl/include/openssl/dsa.h => main/openssl/include/openssl/dsa.h rename : openssl/include/openssl/dso.h => main/openssl/include/openssl/dso.h rename : openssl/include/openssl/dtls1.h => main/openssl/include/openssl/dtls1.h rename : openssl/include/openssl/e_os2.h => main/openssl/include/openssl/e_os2.h rename : openssl/include/openssl/ebcdic.h => main/openssl/include/openssl/ebcdic.h rename : openssl/include/openssl/ec.h => main/openssl/include/openssl/ec.h rename : openssl/include/openssl/ecdh.h => main/openssl/include/openssl/ecdh.h rename : openssl/include/openssl/ecdsa.h => main/openssl/include/openssl/ecdsa.h rename : openssl/include/openssl/engine.h => main/openssl/include/openssl/engine.h rename : openssl/include/openssl/err.h => main/openssl/include/openssl/err.h rename : openssl/include/openssl/evp.h => main/openssl/include/openssl/evp.h rename : openssl/include/openssl/hmac.h => main/openssl/include/openssl/hmac.h rename : openssl/include/openssl/krb5_asn.h => main/openssl/include/openssl/krb5_asn.h rename : openssl/include/openssl/kssl.h => main/openssl/include/openssl/kssl.h rename : openssl/include/openssl/lhash.h => main/openssl/include/openssl/lhash.h rename : openssl/include/openssl/md4.h => main/openssl/include/openssl/md4.h rename : openssl/include/openssl/md5.h => main/openssl/include/openssl/md5.h rename : openssl/include/openssl/modes.h => main/openssl/include/openssl/modes.h rename : openssl/include/openssl/obj_mac.h => main/openssl/include/openssl/obj_mac.h rename : openssl/include/openssl/objects.h => main/openssl/include/openssl/objects.h rename : openssl/include/openssl/ocsp.h => main/openssl/include/openssl/ocsp.h rename : openssl/include/openssl/opensslconf.h => main/openssl/include/openssl/opensslconf.h rename : openssl/include/openssl/opensslv.h => main/openssl/include/openssl/opensslv.h rename : openssl/include/openssl/ossl_typ.h => main/openssl/include/openssl/ossl_typ.h rename : openssl/include/openssl/pem.h => main/openssl/include/openssl/pem.h rename : openssl/include/openssl/pem2.h => main/openssl/include/openssl/pem2.h rename : openssl/include/openssl/pkcs12.h => main/openssl/include/openssl/pkcs12.h rename : openssl/include/openssl/pkcs7.h => main/openssl/include/openssl/pkcs7.h rename : openssl/include/openssl/pqueue.h => main/openssl/include/openssl/pqueue.h rename : openssl/include/openssl/rand.h => main/openssl/include/openssl/rand.h rename : openssl/include/openssl/rc2.h => main/openssl/include/openssl/rc2.h rename : openssl/include/openssl/rc4.h => main/openssl/include/openssl/rc4.h rename : openssl/include/openssl/ripemd.h => main/openssl/include/openssl/ripemd.h rename : openssl/include/openssl/rsa.h => main/openssl/include/openssl/rsa.h rename : openssl/include/openssl/safestack.h => main/openssl/include/openssl/safestack.h rename : openssl/include/openssl/sha.h => main/openssl/include/openssl/sha.h rename : openssl/include/openssl/ssl.h => main/openssl/include/openssl/ssl.h rename : openssl/include/openssl/ssl2.h => main/openssl/include/openssl/ssl2.h rename : openssl/include/openssl/ssl23.h => main/openssl/include/openssl/ssl23.h rename : openssl/include/openssl/ssl3.h => main/openssl/include/openssl/ssl3.h rename : openssl/include/openssl/stack.h => main/openssl/include/openssl/stack.h rename : openssl/include/openssl/symhacks.h => main/openssl/include/openssl/symhacks.h rename : openssl/include/openssl/tls1.h => main/openssl/include/openssl/tls1.h rename : openssl/include/openssl/ts.h => main/openssl/include/openssl/ts.h rename : openssl/include/openssl/txt_db.h => main/openssl/include/openssl/txt_db.h rename : openssl/include/openssl/ui.h => main/openssl/include/openssl/ui.h rename : openssl/include/openssl/ui_compat.h => main/openssl/include/openssl/ui_compat.h rename : openssl/include/openssl/x509.h => main/openssl/include/openssl/x509.h rename : openssl/include/openssl/x509_vfy.h => main/openssl/include/openssl/x509_vfy.h rename : openssl/include/openssl/x509v3.h => main/openssl/include/openssl/x509v3.h rename : openssl/openssl.config => main/openssl/openssl.config rename : openssl/openssl.version => main/openssl/openssl.version rename : openssl/patches/README => main/openssl/patches/README rename : openssl/patches/apps_Android.mk => main/openssl/patches/apps_Android.mk rename : openssl/patches/crypto_Android.mk => main/openssl/patches/crypto_Android.mk rename : openssl/patches/handshake_cutthrough.patch => main/openssl/patches/handshake_cutthrough.patch rename : openssl/patches/jsse.patch => main/openssl/patches/jsse.patch rename : openssl/patches/npn.patch => main/openssl/patches/npn.patch rename : openssl/patches/progs.patch => main/openssl/patches/progs.patch rename : openssl/patches/sha1_armv4_large.patch => main/openssl/patches/sha1_armv4_large.patch rename : openssl/patches/small_records.patch => main/openssl/patches/small_records.patch rename : openssl/patches/ssl_Android.mk => main/openssl/patches/ssl_Android.mk rename : openssl/patches/sslv3_uninit_padding.patch => main/openssl/patches/sslv3_uninit_padding.patch rename : openssl/patches/testssl.sh => main/openssl/patches/testssl.sh rename : openssl/ssl/Android.mk => main/openssl/ssl/Android.mk rename : openssl/ssl/Makefile => main/openssl/ssl/Makefile rename : openssl/ssl/bio_ssl.c => main/openssl/ssl/bio_ssl.c rename : openssl/ssl/d1_both.c => main/openssl/ssl/d1_both.c rename : openssl/ssl/d1_clnt.c => main/openssl/ssl/d1_clnt.c rename : openssl/ssl/d1_enc.c => main/openssl/ssl/d1_enc.c rename : openssl/ssl/d1_lib.c => main/openssl/ssl/d1_lib.c rename : openssl/ssl/d1_meth.c => main/openssl/ssl/d1_meth.c rename : openssl/ssl/d1_pkt.c => main/openssl/ssl/d1_pkt.c rename : openssl/ssl/d1_srvr.c => main/openssl/ssl/d1_srvr.c rename : openssl/ssl/dtls1.h => main/openssl/ssl/dtls1.h rename : openssl/ssl/kssl.c => main/openssl/ssl/kssl.c rename : openssl/ssl/kssl.h => main/openssl/ssl/kssl.h rename : openssl/ssl/kssl_lcl.h => main/openssl/ssl/kssl_lcl.h rename : openssl/ssl/s23_clnt.c => main/openssl/ssl/s23_clnt.c rename : openssl/ssl/s23_lib.c => main/openssl/ssl/s23_lib.c rename : openssl/ssl/s23_meth.c => main/openssl/ssl/s23_meth.c rename : openssl/ssl/s23_pkt.c => main/openssl/ssl/s23_pkt.c rename : openssl/ssl/s23_srvr.c => main/openssl/ssl/s23_srvr.c rename : openssl/ssl/s2_clnt.c => main/openssl/ssl/s2_clnt.c rename : openssl/ssl/s2_enc.c => main/openssl/ssl/s2_enc.c rename : openssl/ssl/s2_lib.c => main/openssl/ssl/s2_lib.c rename : openssl/ssl/s2_meth.c => main/openssl/ssl/s2_meth.c rename : openssl/ssl/s2_pkt.c => main/openssl/ssl/s2_pkt.c rename : openssl/ssl/s2_srvr.c => main/openssl/ssl/s2_srvr.c rename : openssl/ssl/s3_both.c => main/openssl/ssl/s3_both.c rename : openssl/ssl/s3_clnt.c => main/openssl/ssl/s3_clnt.c rename : openssl/ssl/s3_enc.c => main/openssl/ssl/s3_enc.c rename : openssl/ssl/s3_lib.c => main/openssl/ssl/s3_lib.c rename : openssl/ssl/s3_meth.c => main/openssl/ssl/s3_meth.c rename : openssl/ssl/s3_pkt.c => main/openssl/ssl/s3_pkt.c rename : openssl/ssl/s3_srvr.c => main/openssl/ssl/s3_srvr.c rename : openssl/ssl/ssl.h => main/openssl/ssl/ssl.h rename : openssl/ssl/ssl2.h => main/openssl/ssl/ssl2.h rename : openssl/ssl/ssl23.h => main/openssl/ssl/ssl23.h rename : openssl/ssl/ssl3.h => main/openssl/ssl/ssl3.h rename : openssl/ssl/ssl_algs.c => main/openssl/ssl/ssl_algs.c rename : openssl/ssl/ssl_asn1.c => main/openssl/ssl/ssl_asn1.c rename : openssl/ssl/ssl_cert.c => main/openssl/ssl/ssl_cert.c rename : openssl/ssl/ssl_ciph.c => main/openssl/ssl/ssl_ciph.c rename : openssl/ssl/ssl_err.c => main/openssl/ssl/ssl_err.c rename : openssl/ssl/ssl_err2.c => main/openssl/ssl/ssl_err2.c rename : openssl/ssl/ssl_lib.c => main/openssl/ssl/ssl_lib.c rename : openssl/ssl/ssl_locl.h => main/openssl/ssl/ssl_locl.h rename : openssl/ssl/ssl_rsa.c => main/openssl/ssl/ssl_rsa.c rename : openssl/ssl/ssl_sess.c => main/openssl/ssl/ssl_sess.c rename : openssl/ssl/ssl_stat.c => main/openssl/ssl/ssl_stat.c rename : openssl/ssl/ssl_txt.c => main/openssl/ssl/ssl_txt.c rename : openssl/ssl/ssltest.c => main/openssl/ssl/ssltest.c rename : openssl/ssl/t1_clnt.c => main/openssl/ssl/t1_clnt.c rename : openssl/ssl/t1_enc.c => main/openssl/ssl/t1_enc.c rename : openssl/ssl/t1_lib.c => main/openssl/ssl/t1_lib.c rename : openssl/ssl/t1_meth.c => main/openssl/ssl/t1_meth.c rename : openssl/ssl/t1_reneg.c => main/openssl/ssl/t1_reneg.c rename : openssl/ssl/t1_srvr.c => main/openssl/ssl/t1_srvr.c rename : openssl/ssl/tls1.h => main/openssl/ssl/tls1.h rename : openvpn/.gitignore => main/openvpn/.gitignore rename : openvpn/.mailmap => main/openvpn/.mailmap rename : openvpn/.svncommitters => main/openvpn/.svncommitters rename : openvpn/AUTHORS => main/openvpn/AUTHORS rename : openvpn/Android.mk => main/openvpn/Android.mk rename : openvpn/COPYING => main/openvpn/COPYING rename : openvpn/COPYRIGHT.GPL => main/openvpn/COPYRIGHT.GPL rename : openvpn/ChangeLog => main/openvpn/ChangeLog rename : openvpn/INSTALL => main/openvpn/INSTALL rename : openvpn/INSTALL-win32.txt => main/openvpn/INSTALL-win32.txt rename : openvpn/Makefile.am => main/openvpn/Makefile.am rename : openvpn/NEWS => main/openvpn/NEWS rename : openvpn/PORTS => main/openvpn/PORTS rename : openvpn/README => main/openvpn/README rename : openvpn/README.IPv6 => main/openvpn/README.IPv6 rename : openvpn/README.polarssl => main/openvpn/README.polarssl rename : openvpn/TODO.IPv6 => main/openvpn/TODO.IPv6 rename : openvpn/build/Makefile.am => main/openvpn/build/Makefile.am rename : openvpn/build/ltrc.inc => main/openvpn/build/ltrc.inc rename : openvpn/build/msvc/Makefile.am => main/openvpn/build/msvc/Makefile.am rename : openvpn/build/msvc/msvc-generate/Makefile.am => main/openvpn/build/msvc/msvc-generate/Makefile.am rename : openvpn/build/msvc/msvc-generate/Makefile.mak => main/openvpn/build/msvc/msvc-generate/Makefile.mak rename : openvpn/build/msvc/msvc-generate/msvc-generate.js => main/openvpn/build/msvc/msvc-generate/msvc-generate.js rename : openvpn/build/msvc/msvc-generate/msvc-generate.vcxproj => main/openvpn/build/msvc/msvc-generate/msvc-generate.vcxproj rename : openvpn/compat.m4 => main/openvpn/compat.m4 rename : openvpn/config-msvc-version.h.in => main/openvpn/config-msvc-version.h.in rename : openvpn/config-msvc.h => main/openvpn/config-msvc.h rename : openvpn/config-version.h => main/openvpn/config-version.h rename : openvpn/config.h => main/openvpn/config.h rename : openvpn/configure.ac => main/openvpn/configure.ac rename : openvpn/contrib/OCSP_check/OCSP_check.sh => main/openvpn/contrib/OCSP_check/OCSP_check.sh rename : openvpn/contrib/README => main/openvpn/contrib/README rename : openvpn/contrib/multilevel-init.patch => main/openvpn/contrib/multilevel-init.patch rename : openvpn/contrib/openvpn-fwmarkroute-1.00/README => main/openvpn/contrib/openvpn-fwmarkroute-1.00/README rename : openvpn/contrib/openvpn-fwmarkroute-1.00/fwmarkroute.down => main/openvpn/contrib/openvpn-fwmarkroute-1.00/fwmarkroute.down rename : openvpn/contrib/openvpn-fwmarkroute-1.00/fwmarkroute.up => main/openvpn/contrib/openvpn-fwmarkroute-1.00/fwmarkroute.up rename : openvpn/contrib/pull-resolv-conf/client.down => main/openvpn/contrib/pull-resolv-conf/client.down rename : openvpn/contrib/pull-resolv-conf/client.up => main/openvpn/contrib/pull-resolv-conf/client.up rename : openvpn/debug/doval => main/openvpn/debug/doval rename : openvpn/debug/dovalns => main/openvpn/debug/dovalns rename : openvpn/debug/valgrind-suppress => main/openvpn/debug/valgrind-suppress rename : openvpn/distro/Makefile.am => main/openvpn/distro/Makefile.am rename : openvpn/distro/rpm/Makefile.am => main/openvpn/distro/rpm/Makefile.am rename : openvpn/distro/rpm/openvpn.init.d.rhel => main/openvpn/distro/rpm/openvpn.init.d.rhel rename : openvpn/distro/rpm/openvpn.init.d.suse => main/openvpn/distro/rpm/openvpn.init.d.suse rename : openvpn/distro/rpm/openvpn.spec => main/openvpn/distro/rpm/openvpn.spec rename : openvpn/distro/rpm/openvpn.spec.in => main/openvpn/distro/rpm/openvpn.spec.in rename : openvpn/doc/Makefile.am => main/openvpn/doc/Makefile.am rename : openvpn/doc/README.plugins => main/openvpn/doc/README.plugins rename : openvpn/doc/android.txt => main/openvpn/doc/android.txt rename : openvpn/doc/doxygen/doc_compression.h => main/openvpn/doc/doxygen/doc_compression.h rename : openvpn/doc/doxygen/doc_control_processor.h => main/openvpn/doc/doxygen/doc_control_processor.h rename : openvpn/doc/doxygen/doc_control_tls.h => main/openvpn/doc/doxygen/doc_control_tls.h rename : openvpn/doc/doxygen/doc_data_control.h => main/openvpn/doc/doxygen/doc_data_control.h rename : openvpn/doc/doxygen/doc_data_crypto.h => main/openvpn/doc/doxygen/doc_data_crypto.h rename : openvpn/doc/doxygen/doc_eventloop.h => main/openvpn/doc/doxygen/doc_eventloop.h rename : openvpn/doc/doxygen/doc_external_multiplexer.h => main/openvpn/doc/doxygen/doc_external_multiplexer.h rename : openvpn/doc/doxygen/doc_fragmentation.h => main/openvpn/doc/doxygen/doc_fragmentation.h rename : openvpn/doc/doxygen/doc_internal_multiplexer.h => main/openvpn/doc/doxygen/doc_internal_multiplexer.h rename : openvpn/doc/doxygen/doc_key_generation.h => main/openvpn/doc/doxygen/doc_key_generation.h rename : openvpn/doc/doxygen/doc_mainpage.h => main/openvpn/doc/doxygen/doc_mainpage.h rename : openvpn/doc/doxygen/doc_memory_management.h => main/openvpn/doc/doxygen/doc_memory_management.h rename : openvpn/doc/doxygen/doc_protocol_overview.h => main/openvpn/doc/doxygen/doc_protocol_overview.h rename : openvpn/doc/doxygen/doc_reliable.h => main/openvpn/doc/doxygen/doc_reliable.h rename : openvpn/doc/doxygen/doc_tunnel_state.h => main/openvpn/doc/doxygen/doc_tunnel_state.h rename : openvpn/doc/doxygen/openvpn.doxyfile => main/openvpn/doc/doxygen/openvpn.doxyfile rename : openvpn/doc/management-notes.txt => main/openvpn/doc/management-notes.txt rename : openvpn/doc/openvpn.8 => main/openvpn/doc/openvpn.8 rename : openvpn/include/Makefile.am => main/openvpn/include/Makefile.am rename : openvpn/include/openvpn-plugin.h => main/openvpn/include/openvpn-plugin.h rename : openvpn/m4/.keep => main/openvpn/m4/.keep rename : openvpn/m4/ax_emptyarray.m4 => main/openvpn/m4/ax_emptyarray.m4 rename : openvpn/m4/ax_socklen_t.m4 => main/openvpn/m4/ax_socklen_t.m4 rename : openvpn/m4/ax_varargs.m4 => main/openvpn/m4/ax_varargs.m4 rename : openvpn/m4/pkg.m4 => main/openvpn/m4/pkg.m4 rename : openvpn/msvc-build.bat => main/openvpn/msvc-build.bat rename : openvpn/msvc-dev.bat => main/openvpn/msvc-dev.bat rename : openvpn/msvc-env.bat => main/openvpn/msvc-env.bat rename : openvpn/openvpn.sln => main/openvpn/openvpn.sln rename : openvpn/sample/Makefile.am => main/openvpn/sample/Makefile.am rename : openvpn/sample/sample-config-files/README => main/openvpn/sample/sample-config-files/README rename : openvpn/sample/sample-config-files/client.conf => main/openvpn/sample/sample-config-files/client.conf rename : openvpn/sample/sample-config-files/firewall.sh => main/openvpn/sample/sample-config-files/firewall.sh rename : openvpn/sample/sample-config-files/home.up => main/openvpn/sample/sample-config-files/home.up rename : openvpn/sample/sample-config-files/loopback-client => main/openvpn/sample/sample-config-files/loopback-client rename : openvpn/sample/sample-config-files/loopback-server => main/openvpn/sample/sample-config-files/loopback-server rename : openvpn/sample/sample-config-files/office.up => main/openvpn/sample/sample-config-files/office.up rename : openvpn/sample/sample-config-files/openvpn-shutdown.sh => main/openvpn/sample/sample-config-files/openvpn-shutdown.sh rename : openvpn/sample/sample-config-files/openvpn-startup.sh => main/openvpn/sample/sample-config-files/openvpn-startup.sh rename : openvpn/sample/sample-config-files/server.conf => main/openvpn/sample/sample-config-files/server.conf rename : openvpn/sample/sample-config-files/static-home.conf => main/openvpn/sample/sample-config-files/static-home.conf rename : openvpn/sample/sample-config-files/static-office.conf => main/openvpn/sample/sample-config-files/static-office.conf rename : openvpn/sample/sample-config-files/tls-home.conf => main/openvpn/sample/sample-config-files/tls-home.conf rename : openvpn/sample/sample-config-files/tls-office.conf => main/openvpn/sample/sample-config-files/tls-office.conf rename : openvpn/sample/sample-config-files/xinetd-client-config => main/openvpn/sample/sample-config-files/xinetd-client-config rename : openvpn/sample/sample-config-files/xinetd-server-config => main/openvpn/sample/sample-config-files/xinetd-server-config rename : openvpn/sample/sample-keys/README => main/openvpn/sample/sample-keys/README rename : openvpn/sample/sample-keys/ca.crt => main/openvpn/sample/sample-keys/ca.crt rename : openvpn/sample/sample-keys/ca.key => main/openvpn/sample/sample-keys/ca.key rename : openvpn/sample/sample-keys/client.crt => main/openvpn/sample/sample-keys/client.crt rename : openvpn/sample/sample-keys/client.key => main/openvpn/sample/sample-keys/client.key rename : openvpn/sample/sample-keys/dh1024.pem => main/openvpn/sample/sample-keys/dh1024.pem rename : openvpn/sample/sample-keys/pass.crt => main/openvpn/sample/sample-keys/pass.crt rename : openvpn/sample/sample-keys/pass.key => main/openvpn/sample/sample-keys/pass.key rename : openvpn/sample/sample-keys/pkcs12.p12 => main/openvpn/sample/sample-keys/pkcs12.p12 rename : openvpn/sample/sample-keys/server.crt => main/openvpn/sample/sample-keys/server.crt rename : openvpn/sample/sample-keys/server.key => main/openvpn/sample/sample-keys/server.key rename : openvpn/sample/sample-plugins/defer/README => main/openvpn/sample/sample-plugins/defer/README rename : openvpn/sample/sample-plugins/defer/build => main/openvpn/sample/sample-plugins/defer/build rename : openvpn/sample/sample-plugins/defer/simple.c => main/openvpn/sample/sample-plugins/defer/simple.c rename : openvpn/sample/sample-plugins/defer/simple.def => main/openvpn/sample/sample-plugins/defer/simple.def rename : openvpn/sample/sample-plugins/defer/winbuild => main/openvpn/sample/sample-plugins/defer/winbuild rename : openvpn/sample/sample-plugins/log/build => main/openvpn/sample/sample-plugins/log/build rename : openvpn/sample/sample-plugins/log/log.c => main/openvpn/sample/sample-plugins/log/log.c rename : openvpn/sample/sample-plugins/log/log_v3.c => main/openvpn/sample/sample-plugins/log/log_v3.c rename : openvpn/sample/sample-plugins/log/winbuild => main/openvpn/sample/sample-plugins/log/winbuild rename : openvpn/sample/sample-plugins/simple/README => main/openvpn/sample/sample-plugins/simple/README rename : openvpn/sample/sample-plugins/simple/build => main/openvpn/sample/sample-plugins/simple/build rename : openvpn/sample/sample-plugins/simple/simple.c => main/openvpn/sample/sample-plugins/simple/simple.c rename : openvpn/sample/sample-plugins/simple/simple.def => main/openvpn/sample/sample-plugins/simple/simple.def rename : openvpn/sample/sample-plugins/simple/winbuild => main/openvpn/sample/sample-plugins/simple/winbuild rename : openvpn/sample/sample-scripts/auth-pam.pl => main/openvpn/sample/sample-scripts/auth-pam.pl rename : openvpn/sample/sample-scripts/bridge-start => main/openvpn/sample/sample-scripts/bridge-start rename : openvpn/sample/sample-scripts/bridge-stop => main/openvpn/sample/sample-scripts/bridge-stop rename : openvpn/sample/sample-scripts/ucn.pl => main/openvpn/sample/sample-scripts/ucn.pl rename : openvpn/sample/sample-scripts/verify-cn => main/openvpn/sample/sample-scripts/verify-cn rename : openvpn/sample/sample-windows/sample.ovpn => main/openvpn/sample/sample-windows/sample.ovpn rename : openvpn/src/Makefile.am => main/openvpn/src/Makefile.am rename : openvpn/src/compat/Makefile.am => main/openvpn/src/compat/Makefile.am rename : openvpn/src/compat/compat-basename.c => main/openvpn/src/compat/compat-basename.c rename : openvpn/src/compat/compat-daemon.c => main/openvpn/src/compat/compat-daemon.c rename : openvpn/src/compat/compat-dirname.c => main/openvpn/src/compat/compat-dirname.c rename : openvpn/src/compat/compat-gettimeofday.c => main/openvpn/src/compat/compat-gettimeofday.c rename : openvpn/src/compat/compat-inet_ntop.c => main/openvpn/src/compat/compat-inet_ntop.c rename : openvpn/src/compat/compat-inet_pton.c => main/openvpn/src/compat/compat-inet_pton.c rename : openvpn/src/compat/compat-lz4.c => main/openvpn/src/compat/compat-lz4.c rename : openvpn/src/compat/compat-lz4.h => main/openvpn/src/compat/compat-lz4.h rename : openvpn/src/compat/compat-stdbool.h => main/openvpn/src/compat/compat-stdbool.h rename : openvpn/src/compat/compat.h => main/openvpn/src/compat/compat.h rename : openvpn/src/compat/compat.vcxproj => main/openvpn/src/compat/compat.vcxproj rename : openvpn/src/compat/compat.vcxproj.filters => main/openvpn/src/compat/compat.vcxproj.filters rename : openvpn/src/openvpn/Makefile.am => main/openvpn/src/openvpn/Makefile.am rename : openvpn/src/openvpn/base64.c => main/openvpn/src/openvpn/base64.c rename : openvpn/src/openvpn/base64.h => main/openvpn/src/openvpn/base64.h rename : openvpn/src/openvpn/basic.h => main/openvpn/src/openvpn/basic.h rename : openvpn/src/openvpn/breakpad.cpp => main/openvpn/src/openvpn/breakpad.cpp rename : openvpn/src/openvpn/breakpad.h => main/openvpn/src/openvpn/breakpad.h rename : openvpn/src/openvpn/buffer.c => main/openvpn/src/openvpn/buffer.c rename : openvpn/src/openvpn/buffer.h => main/openvpn/src/openvpn/buffer.h rename : openvpn/src/openvpn/circ_list.h => main/openvpn/src/openvpn/circ_list.h rename : openvpn/src/openvpn/clinat.c => main/openvpn/src/openvpn/clinat.c rename : openvpn/src/openvpn/clinat.h => main/openvpn/src/openvpn/clinat.h rename : openvpn/src/openvpn/common.h => main/openvpn/src/openvpn/common.h rename : openvpn/src/openvpn/comp-lz4.c => main/openvpn/src/openvpn/comp-lz4.c rename : openvpn/src/openvpn/comp-lz4.h => main/openvpn/src/openvpn/comp-lz4.h rename : openvpn/src/openvpn/comp.c => main/openvpn/src/openvpn/comp.c rename : openvpn/src/openvpn/comp.h => main/openvpn/src/openvpn/comp.h rename : openvpn/src/openvpn/compstub.c => main/openvpn/src/openvpn/compstub.c rename : openvpn/src/openvpn/console.c => main/openvpn/src/openvpn/console.c rename : openvpn/src/openvpn/console.h => main/openvpn/src/openvpn/console.h rename : openvpn/src/openvpn/crypto.c => main/openvpn/src/openvpn/crypto.c rename : openvpn/src/openvpn/crypto.h => main/openvpn/src/openvpn/crypto.h rename : openvpn/src/openvpn/crypto_backend.h => main/openvpn/src/openvpn/crypto_backend.h rename : openvpn/src/openvpn/crypto_openssl.c => main/openvpn/src/openvpn/crypto_openssl.c rename : openvpn/src/openvpn/crypto_openssl.h => main/openvpn/src/openvpn/crypto_openssl.h rename : openvpn/src/openvpn/crypto_polarssl.c => main/openvpn/src/openvpn/crypto_polarssl.c rename : openvpn/src/openvpn/crypto_polarssl.h => main/openvpn/src/openvpn/crypto_polarssl.h rename : openvpn/src/openvpn/cryptoapi.c => main/openvpn/src/openvpn/cryptoapi.c rename : openvpn/src/openvpn/cryptoapi.h => main/openvpn/src/openvpn/cryptoapi.h rename : openvpn/src/openvpn/dhcp.c => main/openvpn/src/openvpn/dhcp.c rename : openvpn/src/openvpn/dhcp.h => main/openvpn/src/openvpn/dhcp.h rename : openvpn/src/openvpn/errlevel.h => main/openvpn/src/openvpn/errlevel.h rename : openvpn/src/openvpn/error.c => main/openvpn/src/openvpn/error.c rename : openvpn/src/openvpn/error.h => main/openvpn/src/openvpn/error.h rename : openvpn/src/openvpn/event.c => main/openvpn/src/openvpn/event.c rename : openvpn/src/openvpn/event.h => main/openvpn/src/openvpn/event.h rename : openvpn/src/openvpn/fdmisc.c => main/openvpn/src/openvpn/fdmisc.c rename : openvpn/src/openvpn/fdmisc.h => main/openvpn/src/openvpn/fdmisc.h rename : openvpn/src/openvpn/forward-inline.h => main/openvpn/src/openvpn/forward-inline.h rename : openvpn/src/openvpn/forward.c => main/openvpn/src/openvpn/forward.c rename : openvpn/src/openvpn/forward.h => main/openvpn/src/openvpn/forward.h rename : openvpn/src/openvpn/fragment.c => main/openvpn/src/openvpn/fragment.c rename : openvpn/src/openvpn/fragment.h => main/openvpn/src/openvpn/fragment.h rename : openvpn/src/openvpn/gremlin.c => main/openvpn/src/openvpn/gremlin.c rename : openvpn/src/openvpn/gremlin.h => main/openvpn/src/openvpn/gremlin.h rename : openvpn/src/openvpn/helper.c => main/openvpn/src/openvpn/helper.c rename : openvpn/src/openvpn/helper.h => main/openvpn/src/openvpn/helper.h rename : openvpn/src/openvpn/httpdigest.c => main/openvpn/src/openvpn/httpdigest.c rename : openvpn/src/openvpn/httpdigest.h => main/openvpn/src/openvpn/httpdigest.h rename : openvpn/src/openvpn/init.c => main/openvpn/src/openvpn/init.c rename : openvpn/src/openvpn/init.h => main/openvpn/src/openvpn/init.h rename : openvpn/src/openvpn/integer.h => main/openvpn/src/openvpn/integer.h rename : openvpn/src/openvpn/interval.c => main/openvpn/src/openvpn/interval.c rename : openvpn/src/openvpn/interval.h => main/openvpn/src/openvpn/interval.h rename : openvpn/src/openvpn/list.c => main/openvpn/src/openvpn/list.c rename : openvpn/src/openvpn/list.h => main/openvpn/src/openvpn/list.h rename : openvpn/src/openvpn/lladdr.c => main/openvpn/src/openvpn/lladdr.c rename : openvpn/src/openvpn/lladdr.h => main/openvpn/src/openvpn/lladdr.h rename : openvpn/src/openvpn/lzo.c => main/openvpn/src/openvpn/lzo.c rename : openvpn/src/openvpn/lzo.h => main/openvpn/src/openvpn/lzo.h rename : openvpn/src/openvpn/manage.c => main/openvpn/src/openvpn/manage.c rename : openvpn/src/openvpn/manage.h => main/openvpn/src/openvpn/manage.h rename : openvpn/src/openvpn/mbuf.c => main/openvpn/src/openvpn/mbuf.c rename : openvpn/src/openvpn/mbuf.h => main/openvpn/src/openvpn/mbuf.h rename : openvpn/src/openvpn/memdbg.h => main/openvpn/src/openvpn/memdbg.h rename : openvpn/src/openvpn/misc.c => main/openvpn/src/openvpn/misc.c rename : openvpn/src/openvpn/misc.h => main/openvpn/src/openvpn/misc.h rename : openvpn/src/openvpn/mroute.c => main/openvpn/src/openvpn/mroute.c rename : openvpn/src/openvpn/mroute.h => main/openvpn/src/openvpn/mroute.h rename : openvpn/src/openvpn/mss.c => main/openvpn/src/openvpn/mss.c rename : openvpn/src/openvpn/mss.h => main/openvpn/src/openvpn/mss.h rename : openvpn/src/openvpn/mstats.c => main/openvpn/src/openvpn/mstats.c rename : openvpn/src/openvpn/mstats.h => main/openvpn/src/openvpn/mstats.h rename : openvpn/src/openvpn/mtcp.c => main/openvpn/src/openvpn/mtcp.c rename : openvpn/src/openvpn/mtcp.h => main/openvpn/src/openvpn/mtcp.h rename : openvpn/src/openvpn/mtu.c => main/openvpn/src/openvpn/mtu.c rename : openvpn/src/openvpn/mtu.h => main/openvpn/src/openvpn/mtu.h rename : openvpn/src/openvpn/mudp.c => main/openvpn/src/openvpn/mudp.c rename : openvpn/src/openvpn/mudp.h => main/openvpn/src/openvpn/mudp.h rename : openvpn/src/openvpn/multi.c => main/openvpn/src/openvpn/multi.c rename : openvpn/src/openvpn/multi.h => main/openvpn/src/openvpn/multi.h rename : openvpn/src/openvpn/ntlm.c => main/openvpn/src/openvpn/ntlm.c rename : openvpn/src/openvpn/ntlm.h => main/openvpn/src/openvpn/ntlm.h rename : openvpn/src/openvpn/occ-inline.h => main/openvpn/src/openvpn/occ-inline.h rename : openvpn/src/openvpn/occ.c => main/openvpn/src/openvpn/occ.c rename : openvpn/src/openvpn/occ.h => main/openvpn/src/openvpn/occ.h rename : openvpn/src/openvpn/openvpn.c => main/openvpn/src/openvpn/openvpn.c rename : openvpn/src/openvpn/openvpn.h => main/openvpn/src/openvpn/openvpn.h rename : openvpn/src/openvpn/openvpn.vcxproj => main/openvpn/src/openvpn/openvpn.vcxproj rename : openvpn/src/openvpn/openvpn.vcxproj.filters => main/openvpn/src/openvpn/openvpn.vcxproj.filters rename : openvpn/src/openvpn/openvpn_win32_resources.rc => main/openvpn/src/openvpn/openvpn_win32_resources.rc rename : openvpn/src/openvpn/options.c => main/openvpn/src/openvpn/options.c rename : openvpn/src/openvpn/options.h => main/openvpn/src/openvpn/options.h rename : openvpn/src/openvpn/otime.c => main/openvpn/src/openvpn/otime.c rename : openvpn/src/openvpn/otime.h => main/openvpn/src/openvpn/otime.h rename : openvpn/src/openvpn/packet_id.c => main/openvpn/src/openvpn/packet_id.c rename : openvpn/src/openvpn/packet_id.h => main/openvpn/src/openvpn/packet_id.h rename : openvpn/src/openvpn/perf.c => main/openvpn/src/openvpn/perf.c rename : openvpn/src/openvpn/perf.h => main/openvpn/src/openvpn/perf.h rename : openvpn/src/openvpn/pf-inline.h => main/openvpn/src/openvpn/pf-inline.h rename : openvpn/src/openvpn/pf.c => main/openvpn/src/openvpn/pf.c rename : openvpn/src/openvpn/pf.h => main/openvpn/src/openvpn/pf.h rename : openvpn/src/openvpn/ping-inline.h => main/openvpn/src/openvpn/ping-inline.h rename : openvpn/src/openvpn/ping.c => main/openvpn/src/openvpn/ping.c rename : openvpn/src/openvpn/ping.h => main/openvpn/src/openvpn/ping.h rename : openvpn/src/openvpn/pkcs11.c => main/openvpn/src/openvpn/pkcs11.c rename : openvpn/src/openvpn/pkcs11.h => main/openvpn/src/openvpn/pkcs11.h rename : openvpn/src/openvpn/pkcs11_backend.h => main/openvpn/src/openvpn/pkcs11_backend.h rename : openvpn/src/openvpn/pkcs11_openssl.c => main/openvpn/src/openvpn/pkcs11_openssl.c rename : openvpn/src/openvpn/pkcs11_polarssl.c => main/openvpn/src/openvpn/pkcs11_polarssl.c rename : openvpn/src/openvpn/platform.c => main/openvpn/src/openvpn/platform.c rename : openvpn/src/openvpn/platform.h => main/openvpn/src/openvpn/platform.h rename : openvpn/src/openvpn/plugin.c => main/openvpn/src/openvpn/plugin.c rename : openvpn/src/openvpn/plugin.h => main/openvpn/src/openvpn/plugin.h rename : openvpn/src/openvpn/pool.c => main/openvpn/src/openvpn/pool.c rename : openvpn/src/openvpn/pool.h => main/openvpn/src/openvpn/pool.h rename : openvpn/src/openvpn/proto.c => main/openvpn/src/openvpn/proto.c rename : openvpn/src/openvpn/proto.h => main/openvpn/src/openvpn/proto.h rename : openvpn/src/openvpn/proxy.c => main/openvpn/src/openvpn/proxy.c rename : openvpn/src/openvpn/proxy.h => main/openvpn/src/openvpn/proxy.h rename : openvpn/src/openvpn/ps.c => main/openvpn/src/openvpn/ps.c rename : openvpn/src/openvpn/ps.h => main/openvpn/src/openvpn/ps.h rename : openvpn/src/openvpn/push.c => main/openvpn/src/openvpn/push.c rename : openvpn/src/openvpn/push.h => main/openvpn/src/openvpn/push.h rename : openvpn/src/openvpn/pushlist.h => main/openvpn/src/openvpn/pushlist.h rename : openvpn/src/openvpn/reliable.c => main/openvpn/src/openvpn/reliable.c rename : openvpn/src/openvpn/reliable.h => main/openvpn/src/openvpn/reliable.h rename : openvpn/src/openvpn/route.c => main/openvpn/src/openvpn/route.c rename : openvpn/src/openvpn/route.h => main/openvpn/src/openvpn/route.h rename : openvpn/src/openvpn/schedule.c => main/openvpn/src/openvpn/schedule.c rename : openvpn/src/openvpn/schedule.h => main/openvpn/src/openvpn/schedule.h rename : openvpn/src/openvpn/session_id.c => main/openvpn/src/openvpn/session_id.c rename : openvpn/src/openvpn/session_id.h => main/openvpn/src/openvpn/session_id.h rename : openvpn/src/openvpn/shaper.c => main/openvpn/src/openvpn/shaper.c rename : openvpn/src/openvpn/shaper.h => main/openvpn/src/openvpn/shaper.h rename : openvpn/src/openvpn/sig.c => main/openvpn/src/openvpn/sig.c rename : openvpn/src/openvpn/sig.h => main/openvpn/src/openvpn/sig.h rename : openvpn/src/openvpn/snappy.c => main/openvpn/src/openvpn/snappy.c rename : openvpn/src/openvpn/snappy.h => main/openvpn/src/openvpn/snappy.h rename : openvpn/src/openvpn/socket.c => main/openvpn/src/openvpn/socket.c rename : openvpn/src/openvpn/socket.h => main/openvpn/src/openvpn/socket.h rename : openvpn/src/openvpn/socks.c => main/openvpn/src/openvpn/socks.c rename : openvpn/src/openvpn/socks.h => main/openvpn/src/openvpn/socks.h rename : openvpn/src/openvpn/ssl.c => main/openvpn/src/openvpn/ssl.c rename : openvpn/src/openvpn/ssl.h => main/openvpn/src/openvpn/ssl.h rename : openvpn/src/openvpn/ssl_backend.h => main/openvpn/src/openvpn/ssl_backend.h rename : openvpn/src/openvpn/ssl_common.h => main/openvpn/src/openvpn/ssl_common.h rename : openvpn/src/openvpn/ssl_openssl.c => main/openvpn/src/openvpn/ssl_openssl.c rename : openvpn/src/openvpn/ssl_openssl.h => main/openvpn/src/openvpn/ssl_openssl.h rename : openvpn/src/openvpn/ssl_polarssl.c => main/openvpn/src/openvpn/ssl_polarssl.c rename : openvpn/src/openvpn/ssl_polarssl.h => main/openvpn/src/openvpn/ssl_polarssl.h rename : openvpn/src/openvpn/ssl_verify.c => main/openvpn/src/openvpn/ssl_verify.c rename : openvpn/src/openvpn/ssl_verify.h => main/openvpn/src/openvpn/ssl_verify.h rename : openvpn/src/openvpn/ssl_verify_backend.h => main/openvpn/src/openvpn/ssl_verify_backend.h rename : openvpn/src/openvpn/ssl_verify_openssl.c => main/openvpn/src/openvpn/ssl_verify_openssl.c rename : openvpn/src/openvpn/ssl_verify_openssl.h => main/openvpn/src/openvpn/ssl_verify_openssl.h rename : openvpn/src/openvpn/ssl_verify_polarssl.c => main/openvpn/src/openvpn/ssl_verify_polarssl.c rename : openvpn/src/openvpn/ssl_verify_polarssl.h => main/openvpn/src/openvpn/ssl_verify_polarssl.h rename : openvpn/src/openvpn/status.c => main/openvpn/src/openvpn/status.c rename : openvpn/src/openvpn/status.h => main/openvpn/src/openvpn/status.h rename : openvpn/src/openvpn/syshead.h => main/openvpn/src/openvpn/syshead.h rename : openvpn/src/openvpn/tun.c => main/openvpn/src/openvpn/tun.c rename : openvpn/src/openvpn/tun.h => main/openvpn/src/openvpn/tun.h rename : openvpn/src/openvpn/win32.c => main/openvpn/src/openvpn/win32.c rename : openvpn/src/openvpn/win32.h => main/openvpn/src/openvpn/win32.h rename : openvpn/src/openvpnserv/Makefile.am => main/openvpn/src/openvpnserv/Makefile.am rename : openvpn/src/openvpnserv/openvpnserv.c => main/openvpn/src/openvpnserv/openvpnserv.c rename : openvpn/src/openvpnserv/openvpnserv.vcxproj => main/openvpn/src/openvpnserv/openvpnserv.vcxproj rename : openvpn/src/openvpnserv/openvpnserv.vcxproj.filters => main/openvpn/src/openvpnserv/openvpnserv.vcxproj.filters rename : openvpn/src/openvpnserv/openvpnserv_resources.rc => main/openvpn/src/openvpnserv/openvpnserv_resources.rc rename : openvpn/src/openvpnserv/service.c => main/openvpn/src/openvpnserv/service.c rename : openvpn/src/openvpnserv/service.h => main/openvpn/src/openvpnserv/service.h rename : openvpn/src/plugins/Makefile.am => main/openvpn/src/plugins/Makefile.am rename : openvpn/src/plugins/Makefile.in => main/openvpn/src/plugins/Makefile.in rename : openvpn/src/plugins/auth-pam/Makefile.am => main/openvpn/src/plugins/auth-pam/Makefile.am rename : openvpn/src/plugins/auth-pam/Makefile.in => main/openvpn/src/plugins/auth-pam/Makefile.in rename : openvpn/src/plugins/auth-pam/README.auth-pam => main/openvpn/src/plugins/auth-pam/README.auth-pam rename : openvpn/src/plugins/auth-pam/auth-pam.c => main/openvpn/src/plugins/auth-pam/auth-pam.c rename : openvpn/src/plugins/auth-pam/auth-pam.exports => main/openvpn/src/plugins/auth-pam/auth-pam.exports rename : openvpn/src/plugins/auth-pam/pamdl.c => main/openvpn/src/plugins/auth-pam/pamdl.c rename : openvpn/src/plugins/auth-pam/pamdl.h => main/openvpn/src/plugins/auth-pam/pamdl.h rename : openvpn/src/plugins/down-root/Makefile.am => main/openvpn/src/plugins/down-root/Makefile.am rename : openvpn/src/plugins/down-root/Makefile.in => main/openvpn/src/plugins/down-root/Makefile.in rename : openvpn/src/plugins/down-root/README.down-root => main/openvpn/src/plugins/down-root/README.down-root rename : openvpn/src/plugins/down-root/down-root.c => main/openvpn/src/plugins/down-root/down-root.c rename : openvpn/src/plugins/down-root/down-root.exports => main/openvpn/src/plugins/down-root/down-root.exports rename : openvpn/tests/Makefile.am => main/openvpn/tests/Makefile.am rename : openvpn/tests/t_client.rc-sample => main/openvpn/tests/t_client.rc-sample rename : openvpn/tests/t_client.sh.in => main/openvpn/tests/t_client.sh.in rename : openvpn/tests/t_cltsrv-down.sh => main/openvpn/tests/t_cltsrv-down.sh rename : openvpn/tests/t_cltsrv.sh => main/openvpn/tests/t_cltsrv.sh rename : openvpn/tests/t_lpback.sh => main/openvpn/tests/t_lpback.sh rename : openvpn/version.m4 => main/openvpn/version.m4 rename : openvpn/version.sh.in => main/openvpn/version.sh.in rename : snappy/Android.mk => main/snappy/Android.mk rename : snappy/COPYING => main/snappy/COPYING rename : snappy/conf/config.h => main/snappy/conf/config.h rename : snappy/snappy-c.cc => main/snappy/snappy-c.cc rename : snappy/snappy-c.h => main/snappy/snappy-c.h rename : snappy/snappy-internal.h => main/snappy/snappy-internal.h rename : snappy/snappy-sinksource.cc => main/snappy/snappy-sinksource.cc rename : snappy/snappy-sinksource.h => main/snappy/snappy-sinksource.h rename : snappy/snappy-stubs-internal.cc => main/snappy/snappy-stubs-internal.cc rename : snappy/snappy-stubs-internal.h => main/snappy/snappy-stubs-internal.h rename : snappy/snappy-stubs-public.h => main/snappy/snappy-stubs-public.h rename : snappy/snappy-stubs-public.h.in => main/snappy/snappy-stubs-public.h.in rename : snappy/snappy-test.cc => main/snappy/snappy-test.cc rename : snappy/snappy-test.h => main/snappy/snappy-test.h rename : snappy/snappy.cc => main/snappy/snappy.cc rename : snappy/snappy.h => main/snappy/snappy.h rename : snappy/snappy_unittest.cc => main/snappy/snappy_unittest.cc rename : AndroidManifest.xml => main/src/main/AndroidManifest.xml rename : src/de/blinkt/openvpn/FileProvider.java => main/src/main/java/de/blinkt/openvpn/FileProvider.java rename : src/de/blinkt/openvpn/LaunchVPN.java => main/src/main/java/de/blinkt/openvpn/LaunchVPN.java rename : src/de/blinkt/openvpn/OnBootReceiver.java => main/src/main/java/de/blinkt/openvpn/OnBootReceiver.java rename : src/de/blinkt/openvpn/VpnProfile.java => main/src/main/java/de/blinkt/openvpn/VpnProfile.java rename : src/de/blinkt/openvpn/activities/ConfigConverter.java => main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java rename : src/de/blinkt/openvpn/activities/CreateShortcuts.java => main/src/main/java/de/blinkt/openvpn/activities/CreateShortcuts.java rename : src/de/blinkt/openvpn/activities/DisconnectVPN.java => main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java rename : src/de/blinkt/openvpn/activities/FileSelect.java => main/src/main/java/de/blinkt/openvpn/activities/FileSelect.java rename : src/de/blinkt/openvpn/activities/LogWindow.java => main/src/main/java/de/blinkt/openvpn/activities/LogWindow.java rename : src/de/blinkt/openvpn/activities/MainActivity.java => main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java rename : src/de/blinkt/openvpn/activities/VPNPreferences.java => main/src/main/java/de/blinkt/openvpn/activities/VPNPreferences.java rename : src/de/blinkt/openvpn/api/APIVpnProfile.java => main/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java rename : src/de/blinkt/openvpn/api/ConfirmDialog.java => main/src/main/java/de/blinkt/openvpn/api/ConfirmDialog.java rename : src/de/blinkt/openvpn/api/ExternalAppDatabase.java => main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java rename : src/de/blinkt/openvpn/api/ExternalOpenVPNService.java => main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java rename : src/de/blinkt/openvpn/api/GrantPermissionsActivity.java => main/src/main/java/de/blinkt/openvpn/api/GrantPermissionsActivity.java rename : src/de/blinkt/openvpn/api/SecurityRemoteException.java => main/src/main/java/de/blinkt/openvpn/api/SecurityRemoteException.java rename : src/de/blinkt/openvpn/core/CIDRIP.java => main/src/main/java/de/blinkt/openvpn/core/CIDRIP.java rename : src/de/blinkt/openvpn/core/ConfigParser.java => main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java rename : src/de/blinkt/openvpn/core/DeviceStateReceiver.java => main/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java rename : src/de/blinkt/openvpn/core/GetRestrictionReceiver.java => main/src/main/java/de/blinkt/openvpn/core/GetRestrictionReceiver.java rename : src/de/blinkt/openvpn/core/ICSOpenVPNApplication.java => main/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java rename : src/de/blinkt/openvpn/core/NativeUtils.java => main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java rename : src/de/blinkt/openvpn/core/NetworkSpace.java => main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java rename : src/de/blinkt/openvpn/core/OpenVPNManagement.java => main/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java rename : src/de/blinkt/openvpn/core/OpenVPNThread.java => main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java rename : src/de/blinkt/openvpn/core/OpenVpnManagementThread.java => main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java rename : src/de/blinkt/openvpn/core/OpenVpnService.java => main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java rename : src/de/blinkt/openvpn/core/PRNGFixes.java => main/src/main/java/de/blinkt/openvpn/core/PRNGFixes.java rename : src/de/blinkt/openvpn/core/ProfileManager.java => main/src/main/java/de/blinkt/openvpn/core/ProfileManager.java rename : src/de/blinkt/openvpn/core/ProxyDetection.java => main/src/main/java/de/blinkt/openvpn/core/ProxyDetection.java rename : src/de/blinkt/openvpn/core/VPNLaunchHelper.java => main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java rename : src/de/blinkt/openvpn/core/VpnStatus.java => main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java rename : src/de/blinkt/openvpn/core/X509Utils.java => main/src/main/java/de/blinkt/openvpn/core/X509Utils.java rename : src/de/blinkt/openvpn/fragments/AboutFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/AboutFragment.java rename : src/de/blinkt/openvpn/fragments/FaqFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/FaqFragment.java rename : src/de/blinkt/openvpn/fragments/FileSelectionFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java rename : src/de/blinkt/openvpn/fragments/GeneralSettings.java => main/src/main/java/de/blinkt/openvpn/fragments/GeneralSettings.java rename : src/de/blinkt/openvpn/fragments/InlineFileTab.java => main/src/main/java/de/blinkt/openvpn/fragments/InlineFileTab.java rename : src/de/blinkt/openvpn/fragments/LogFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java rename : src/de/blinkt/openvpn/fragments/OpenVpnPreferencesFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/OpenVpnPreferencesFragment.java rename : src/de/blinkt/openvpn/fragments/SendDumpFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java rename : src/de/blinkt/openvpn/fragments/Settings_Authentication.java => main/src/main/java/de/blinkt/openvpn/fragments/Settings_Authentication.java rename : src/de/blinkt/openvpn/fragments/Settings_Basic.java => main/src/main/java/de/blinkt/openvpn/fragments/Settings_Basic.java rename : src/de/blinkt/openvpn/fragments/Settings_IP.java => main/src/main/java/de/blinkt/openvpn/fragments/Settings_IP.java rename : src/de/blinkt/openvpn/fragments/Settings_Obscure.java => main/src/main/java/de/blinkt/openvpn/fragments/Settings_Obscure.java rename : src/de/blinkt/openvpn/fragments/Settings_Routing.java => main/src/main/java/de/blinkt/openvpn/fragments/Settings_Routing.java rename : src/de/blinkt/openvpn/fragments/ShowConfigFragment.java => main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java rename : src/de/blinkt/openvpn/fragments/Utils.java => main/src/main/java/de/blinkt/openvpn/fragments/Utils.java rename : src/de/blinkt/openvpn/fragments/VPNProfileList.java => main/src/main/java/de/blinkt/openvpn/fragments/VPNProfileList.java rename : src/de/blinkt/openvpn/views/FileSelectLayout.java => main/src/main/java/de/blinkt/openvpn/views/FileSelectLayout.java rename : src/de/blinkt/openvpn/views/RemoteCNPreference.java => main/src/main/java/de/blinkt/openvpn/views/RemoteCNPreference.java rename : src/de/blinkt/openvpn/views/SeekBarTicks.java => main/src/main/java/de/blinkt/openvpn/views/SeekBarTicks.java rename : src/org/spongycastle/util/encoders/Base64.java => main/src/main/java/org/spongycastle/util/encoders/Base64.java rename : src/org/spongycastle/util/encoders/Base64Encoder.java => main/src/main/java/org/spongycastle/util/encoders/Base64Encoder.java rename : src/org/spongycastle/util/encoders/Encoder.java => main/src/main/java/org/spongycastle/util/encoders/Encoder.java rename : src/org/spongycastle/util/io/pem/PemGenerationException.java => main/src/main/java/org/spongycastle/util/io/pem/PemGenerationException.java rename : src/org/spongycastle/util/io/pem/PemHeader.java => main/src/main/java/org/spongycastle/util/io/pem/PemHeader.java rename : src/org/spongycastle/util/io/pem/PemObject.java => main/src/main/java/org/spongycastle/util/io/pem/PemObject.java rename : src/org/spongycastle/util/io/pem/PemObjectGenerator.java => main/src/main/java/org/spongycastle/util/io/pem/PemObjectGenerator.java rename : src/org/spongycastle/util/io/pem/PemReader.java => main/src/main/java/org/spongycastle/util/io/pem/PemReader.java rename : src/org/spongycastle/util/io/pem/PemWriter.java => main/src/main/java/org/spongycastle/util/io/pem/PemWriter.java
Diffstat (limited to 'main/openssl/crypto/pkcs7')
-rw-r--r--main/openssl/crypto/pkcs7/bio_ber.c466
-rw-r--r--main/openssl/crypto/pkcs7/dec.c248
-rw-r--r--main/openssl/crypto/pkcs7/des.pem15
-rw-r--r--main/openssl/crypto/pkcs7/doc24
-rw-r--r--main/openssl/crypto/pkcs7/enc.c174
-rw-r--r--main/openssl/crypto/pkcs7/es1.pem66
-rw-r--r--main/openssl/crypto/pkcs7/example.c329
-rw-r--r--main/openssl/crypto/pkcs7/example.h57
-rw-r--r--main/openssl/crypto/pkcs7/info.pem57
-rw-r--r--main/openssl/crypto/pkcs7/infokey.pem9
-rw-r--r--main/openssl/crypto/pkcs7/p7/a12
-rw-r--r--main/openssl/crypto/pkcs7/p7/a21
-rw-r--r--main/openssl/crypto/pkcs7/p7/cert.p7cbin0 -> 1728 bytes
-rw-r--r--main/openssl/crypto/pkcs7/p7/smime.p7mbin0 -> 4894 bytes
-rw-r--r--main/openssl/crypto/pkcs7/p7/smime.p7sbin0 -> 2625 bytes
-rw-r--r--main/openssl/crypto/pkcs7/pk7_asn1.c247
-rw-r--r--main/openssl/crypto/pkcs7/pk7_attr.c165
-rw-r--r--main/openssl/crypto/pkcs7/pk7_dgst.c66
-rw-r--r--main/openssl/crypto/pkcs7/pk7_doit.c1248
-rw-r--r--main/openssl/crypto/pkcs7/pk7_enc.c76
-rw-r--r--main/openssl/crypto/pkcs7/pk7_lib.c665
-rw-r--r--main/openssl/crypto/pkcs7/pk7_mime.c97
-rw-r--r--main/openssl/crypto/pkcs7/pk7_smime.c587
-rw-r--r--main/openssl/crypto/pkcs7/pkcs7.h499
-rw-r--r--main/openssl/crypto/pkcs7/pkcs7err.c187
-rw-r--r--main/openssl/crypto/pkcs7/server.pem24
-rw-r--r--main/openssl/crypto/pkcs7/sign.c154
-rw-r--r--main/openssl/crypto/pkcs7/t/3des.pem16
-rw-r--r--main/openssl/crypto/pkcs7/t/3dess.pem32
-rw-r--r--main/openssl/crypto/pkcs7/t/c.pem48
-rw-r--r--main/openssl/crypto/pkcs7/t/ff32
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-e20
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-e.pem22
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-enc-0162
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-enc-01.pem66
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-enc-0290
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-enc-02.pem106
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-s-a-e91
-rw-r--r--main/openssl/crypto/pkcs7/t/msie-s-a-e.pem106
-rw-r--r--main/openssl/crypto/pkcs7/t/nav-smime157
-rw-r--r--main/openssl/crypto/pkcs7/t/s.pem57
-rw-r--r--main/openssl/crypto/pkcs7/t/server.pem57
-rw-r--r--main/openssl/crypto/pkcs7/verify.c263
43 files changed, 6688 insertions, 0 deletions
diff --git a/main/openssl/crypto/pkcs7/bio_ber.c b/main/openssl/crypto/pkcs7/bio_ber.c
new file mode 100644
index 00000000..31973fcd
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/bio_ber.c
@@ -0,0 +1,466 @@
+/* crypto/evp/bio_ber.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include "cryptlib.h"
+#include <openssl/buffer.h>
+#include <openssl/evp.h>
+
+static int ber_write(BIO *h,char *buf,int num);
+static int ber_read(BIO *h,char *buf,int size);
+/*static int ber_puts(BIO *h,char *str); */
+/*static int ber_gets(BIO *h,char *str,int size); */
+static long ber_ctrl(BIO *h,int cmd,long arg1,char *arg2);
+static int ber_new(BIO *h);
+static int ber_free(BIO *data);
+static long ber_callback_ctrl(BIO *h,int cmd,void *(*fp)());
+#define BER_BUF_SIZE (32)
+
+/* This is used to hold the state of the BER objects being read. */
+typedef struct ber_struct
+ {
+ int tag;
+ int class;
+ long length;
+ int inf;
+ int num_left;
+ int depth;
+ } BER_CTX;
+
+typedef struct bio_ber_struct
+ {
+ int tag;
+ int class;
+ long length;
+ int inf;
+
+ /* most of the following are used when doing non-blocking IO */
+ /* reading */
+ long num_left; /* number of bytes still to read/write in block */
+ int depth; /* used with indefinite encoding. */
+ int finished; /* No more read data */
+
+ /* writting */
+ char *w_addr;
+ int w_offset;
+ int w_left;
+
+ int buf_len;
+ int buf_off;
+ unsigned char buf[BER_BUF_SIZE];
+ } BIO_BER_CTX;
+
+static BIO_METHOD methods_ber=
+ {
+ BIO_TYPE_CIPHER,"cipher",
+ ber_write,
+ ber_read,
+ NULL, /* ber_puts, */
+ NULL, /* ber_gets, */
+ ber_ctrl,
+ ber_new,
+ ber_free,
+ ber_callback_ctrl,
+ };
+
+BIO_METHOD *BIO_f_ber(void)
+ {
+ return(&methods_ber);
+ }
+
+static int ber_new(BIO *bi)
+ {
+ BIO_BER_CTX *ctx;
+
+ ctx=(BIO_BER_CTX *)OPENSSL_malloc(sizeof(BIO_BER_CTX));
+ if (ctx == NULL) return(0);
+
+ memset((char *)ctx,0,sizeof(BIO_BER_CTX));
+
+ bi->init=0;
+ bi->ptr=(char *)ctx;
+ bi->flags=0;
+ return(1);
+ }
+
+static int ber_free(BIO *a)
+ {
+ BIO_BER_CTX *b;
+
+ if (a == NULL) return(0);
+ b=(BIO_BER_CTX *)a->ptr;
+ OPENSSL_cleanse(a->ptr,sizeof(BIO_BER_CTX));
+ OPENSSL_free(a->ptr);
+ a->ptr=NULL;
+ a->init=0;
+ a->flags=0;
+ return(1);
+ }
+
+int bio_ber_get_header(BIO *bio, BIO_BER_CTX *ctx)
+ {
+ char buf[64];
+ int i,j,n;
+ int ret;
+ unsigned char *p;
+ unsigned long length
+ int tag;
+ int class;
+ long max;
+
+ BIO_clear_retry_flags(b);
+
+ /* Pack the buffer down if there is a hole at the front */
+ if (ctx->buf_off != 0)
+ {
+ p=ctx->buf;
+ j=ctx->buf_off;
+ n=ctx->buf_len-j;
+ for (i=0; i<n; i++)
+ {
+ p[0]=p[j];
+ p++;
+ }
+ ctx->buf_len-j;
+ ctx->buf_off=0;
+ }
+
+ /* If there is more room, read some more data */
+ i=BER_BUF_SIZE-ctx->buf_len;
+ if (i)
+ {
+ i=BIO_read(bio->next_bio,&(ctx->buf[ctx->buf_len]),i);
+ if (i <= 0)
+ {
+ BIO_copy_next_retry(b);
+ return(i);
+ }
+ else
+ ctx->buf_len+=i;
+ }
+
+ max=ctx->buf_len;
+ p=ctx->buf;
+ ret=ASN1_get_object(&p,&length,&tag,&class,max);
+
+ if (ret & 0x80)
+ {
+ if ((ctx->buf_len < BER_BUF_SIZE) &&
+ (ERR_GET_REASON(ERR_peek_error()) == ASN1_R_TOO_LONG))
+ {
+ ERR_clear_error(); /* clear the error */
+ BIO_set_retry_read(b);
+ }
+ return(-1);
+ }
+
+ /* We have no error, we have a header, so make use of it */
+
+ if ((ctx->tag >= 0) && (ctx->tag != tag))
+ {
+ BIOerr(BIO_F_BIO_BER_GET_HEADER,BIO_R_TAG_MISMATCH);
+ sprintf(buf,"tag=%d, got %d",ctx->tag,tag);
+ ERR_add_error_data(1,buf);
+ return(-1);
+ }
+ if (ret & 0x01)
+ if (ret & V_ASN1_CONSTRUCTED)
+ }
+
+static int ber_read(BIO *b, char *out, int outl)
+ {
+ int ret=0,i,n;
+ BIO_BER_CTX *ctx;
+
+ BIO_clear_retry_flags(b);
+
+ if (out == NULL) return(0);
+ ctx=(BIO_BER_CTX *)b->ptr;
+
+ if ((ctx == NULL) || (b->next_bio == NULL)) return(0);
+
+ if (ctx->finished) return(0);
+
+again:
+ /* First see if we are half way through reading a block */
+ if (ctx->num_left > 0)
+ {
+ if (ctx->num_left < outl)
+ n=ctx->num_left;
+ else
+ n=outl;
+ i=BIO_read(b->next_bio,out,n);
+ if (i <= 0)
+ {
+ BIO_copy_next_retry(b);
+ return(i);
+ }
+ ctx->num_left-=i;
+ outl-=i;
+ ret+=i;
+ if (ctx->num_left <= 0)
+ {
+ ctx->depth--;
+ if (ctx->depth <= 0)
+ ctx->finished=1;
+ }
+ if (outl <= 0)
+ return(ret);
+ else
+ goto again;
+ }
+ else /* we need to read another BER header */
+ {
+ }
+ }
+
+static int ber_write(BIO *b, char *in, int inl)
+ {
+ int ret=0,n,i;
+ BIO_ENC_CTX *ctx;
+
+ ctx=(BIO_ENC_CTX *)b->ptr;
+ ret=inl;
+
+ BIO_clear_retry_flags(b);
+ n=ctx->buf_len-ctx->buf_off;
+ while (n > 0)
+ {
+ i=BIO_write(b->next_bio,&(ctx->buf[ctx->buf_off]),n);
+ if (i <= 0)
+ {
+ BIO_copy_next_retry(b);
+ return(i);
+ }
+ ctx->buf_off+=i;
+ n-=i;
+ }
+ /* at this point all pending data has been written */
+
+ if ((in == NULL) || (inl <= 0)) return(0);
+
+ ctx->buf_off=0;
+ while (inl > 0)
+ {
+ n=(inl > ENC_BLOCK_SIZE)?ENC_BLOCK_SIZE:inl;
+ EVP_CipherUpdate(&(ctx->cipher),
+ (unsigned char *)ctx->buf,&ctx->buf_len,
+ (unsigned char *)in,n);
+ inl-=n;
+ in+=n;
+
+ ctx->buf_off=0;
+ n=ctx->buf_len;
+ while (n > 0)
+ {
+ i=BIO_write(b->next_bio,&(ctx->buf[ctx->buf_off]),n);
+ if (i <= 0)
+ {
+ BIO_copy_next_retry(b);
+ return(i);
+ }
+ n-=i;
+ ctx->buf_off+=i;
+ }
+ ctx->buf_len=0;
+ ctx->buf_off=0;
+ }
+ BIO_copy_next_retry(b);
+ return(ret);
+ }
+
+static long ber_ctrl(BIO *b, int cmd, long num, char *ptr)
+ {
+ BIO *dbio;
+ BIO_ENC_CTX *ctx,*dctx;
+ long ret=1;
+ int i;
+
+ ctx=(BIO_ENC_CTX *)b->ptr;
+
+ switch (cmd)
+ {
+ case BIO_CTRL_RESET:
+ ctx->ok=1;
+ ctx->finished=0;
+ EVP_CipherInit_ex(&(ctx->cipher),NULL,NULL,NULL,NULL,
+ ctx->cipher.berrypt);
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ break;
+ case BIO_CTRL_EOF: /* More to read */
+ if (ctx->cont <= 0)
+ ret=1;
+ else
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ break;
+ case BIO_CTRL_WPENDING:
+ ret=ctx->buf_len-ctx->buf_off;
+ if (ret <= 0)
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ break;
+ case BIO_CTRL_PENDING: /* More to read in buffer */
+ ret=ctx->buf_len-ctx->buf_off;
+ if (ret <= 0)
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ break;
+ case BIO_CTRL_FLUSH:
+ /* do a final write */
+again:
+ while (ctx->buf_len != ctx->buf_off)
+ {
+ i=ber_write(b,NULL,0);
+ if (i < 0)
+ {
+ ret=i;
+ break;
+ }
+ }
+
+ if (!ctx->finished)
+ {
+ ctx->finished=1;
+ ctx->buf_off=0;
+ ret=EVP_CipherFinal_ex(&(ctx->cipher),
+ (unsigned char *)ctx->buf,
+ &(ctx->buf_len));
+ ctx->ok=(int)ret;
+ if (ret <= 0) break;
+
+ /* push out the bytes */
+ goto again;
+ }
+
+ /* Finally flush the underlying BIO */
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ break;
+ case BIO_C_GET_CIPHER_STATUS:
+ ret=(long)ctx->ok;
+ break;
+ case BIO_C_DO_STATE_MACHINE:
+ BIO_clear_retry_flags(b);
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ BIO_copy_next_retry(b);
+ break;
+
+ case BIO_CTRL_DUP:
+ dbio=(BIO *)ptr;
+ dctx=(BIO_ENC_CTX *)dbio->ptr;
+ memcpy(&(dctx->cipher),&(ctx->cipher),sizeof(ctx->cipher));
+ dbio->init=1;
+ break;
+ default:
+ ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
+ break;
+ }
+ return(ret);
+ }
+
+static long ber_callback_ctrl(BIO *b, int cmd, void *(*fp)())
+ {
+ long ret=1;
+
+ if (b->next_bio == NULL) return(0);
+ switch (cmd)
+ {
+ default:
+ ret=BIO_callback_ctrl(b->next_bio,cmd,fp);
+ break;
+ }
+ return(ret);
+ }
+
+/*
+void BIO_set_cipher_ctx(b,c)
+BIO *b;
+EVP_CIPHER_ctx *c;
+ {
+ if (b == NULL) return;
+
+ if ((b->callback != NULL) &&
+ (b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,0L) <= 0))
+ return;
+
+ b->init=1;
+ ctx=(BIO_ENC_CTX *)b->ptr;
+ memcpy(ctx->cipher,c,sizeof(EVP_CIPHER_CTX));
+
+ if (b->callback != NULL)
+ b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,1L);
+ }
+*/
+
+void BIO_set_cipher(BIO *b, EVP_CIPHER *c, unsigned char *k, unsigned char *i,
+ int e)
+ {
+ BIO_ENC_CTX *ctx;
+
+ if (b == NULL) return;
+
+ if ((b->callback != NULL) &&
+ (b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,0L) <= 0))
+ return;
+
+ b->init=1;
+ ctx=(BIO_ENC_CTX *)b->ptr;
+ EVP_CipherInit_ex(&(ctx->cipher),c,NULL,k,i,e);
+
+ if (b->callback != NULL)
+ b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,1L);
+ }
+
diff --git a/main/openssl/crypto/pkcs7/dec.c b/main/openssl/crypto/pkcs7/dec.c
new file mode 100644
index 00000000..6752ec56
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/dec.c
@@ -0,0 +1,248 @@
+/* crypto/pkcs7/verify.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <openssl/bio.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+#include <openssl/asn1.h>
+
+int verify_callback(int ok, X509_STORE_CTX *ctx);
+
+BIO *bio_err=NULL;
+
+int main(argc,argv)
+int argc;
+char *argv[];
+ {
+ char *keyfile=NULL;
+ BIO *in;
+ EVP_PKEY *pkey;
+ X509 *x509;
+ PKCS7 *p7;
+ PKCS7_SIGNER_INFO *si;
+ X509_STORE_CTX cert_ctx;
+ X509_STORE *cert_store=NULL;
+ BIO *data,*detached=NULL,*p7bio=NULL;
+ char buf[1024*4];
+ unsigned char *pp;
+ int i,printit=0;
+ STACK_OF(PKCS7_SIGNER_INFO) *sk;
+
+ OpenSSL_add_all_algorithms();
+ bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
+
+ data=BIO_new(BIO_s_file());
+ pp=NULL;
+ while (argc > 1)
+ {
+ argc--;
+ argv++;
+ if (strcmp(argv[0],"-p") == 0)
+ {
+ printit=1;
+ }
+ else if ((strcmp(argv[0],"-k") == 0) && (argc >= 2)) {
+ keyfile = argv[1];
+ argc-=1;
+ argv+=1;
+ } else if ((strcmp(argv[0],"-d") == 0) && (argc >= 2))
+ {
+ detached=BIO_new(BIO_s_file());
+ if (!BIO_read_filename(detached,argv[1]))
+ goto err;
+ argc-=1;
+ argv+=1;
+ }
+ else break;
+ }
+
+ if (!BIO_read_filename(data,argv[0])) goto err;
+
+ if(!keyfile) {
+ fprintf(stderr, "No private key file specified\n");
+ goto err;
+ }
+
+ if ((in=BIO_new_file(keyfile,"r")) == NULL) goto err;
+ if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err;
+ BIO_reset(in);
+ if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL)
+ goto err;
+ BIO_free(in);
+
+ if (pp == NULL)
+ BIO_set_fp(data,stdin,BIO_NOCLOSE);
+
+
+ /* Load the PKCS7 object from a file */
+ if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL,NULL)) == NULL) goto err;
+
+
+
+ /* This stuff is being setup for certificate verification.
+ * When using SSL, it could be replaced with a
+ * cert_stre=SSL_CTX_get_cert_store(ssl_ctx); */
+ cert_store=X509_STORE_new();
+ X509_STORE_set_default_paths(cert_store);
+ X509_STORE_load_locations(cert_store,NULL,"../../certs");
+ X509_STORE_set_verify_cb_func(cert_store,verify_callback);
+
+ ERR_clear_error();
+
+ /* We need to process the data */
+ /* We cannot support detached encryption */
+ p7bio=PKCS7_dataDecode(p7,pkey,detached,x509);
+
+ if (p7bio == NULL)
+ {
+ printf("problems decoding\n");
+ goto err;
+ }
+
+ /* We now have to 'read' from p7bio to calculate digests etc. */
+ for (;;)
+ {
+ i=BIO_read(p7bio,buf,sizeof(buf));
+ /* print it? */
+ if (i <= 0) break;
+ fwrite(buf,1, i, stdout);
+ }
+
+ /* We can now verify signatures */
+ sk=PKCS7_get_signer_info(p7);
+ if (sk == NULL)
+ {
+ fprintf(stderr, "there are no signatures on this data\n");
+ }
+ else
+ {
+ /* Ok, first we need to, for each subject entry,
+ * see if we can verify */
+ ERR_clear_error();
+ for (i=0; i<sk_PKCS7_SIGNER_INFO_num(sk); i++)
+ {
+ si=sk_PKCS7_SIGNER_INFO_value(sk,i);
+ i=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si);
+ if (i <= 0)
+ goto err;
+ else
+ fprintf(stderr,"Signature verified\n");
+ }
+ }
+ X509_STORE_free(cert_store);
+
+ exit(0);
+err:
+ ERR_load_crypto_strings();
+ ERR_print_errors_fp(stderr);
+ exit(1);
+ }
+
+/* should be X509 * but we can just have them as char *. */
+int verify_callback(int ok, X509_STORE_CTX *ctx)
+ {
+ char buf[256];
+ X509 *err_cert;
+ int err,depth;
+
+ err_cert=X509_STORE_CTX_get_current_cert(ctx);
+ err= X509_STORE_CTX_get_error(ctx);
+ depth= X509_STORE_CTX_get_error_depth(ctx);
+
+ X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256);
+ BIO_printf(bio_err,"depth=%d %s\n",depth,buf);
+ if (!ok)
+ {
+ BIO_printf(bio_err,"verify error:num=%d:%s\n",err,
+ X509_verify_cert_error_string(err));
+ if (depth < 6)
+ {
+ ok=1;
+ X509_STORE_CTX_set_error(ctx,X509_V_OK);
+ }
+ else
+ {
+ ok=0;
+ X509_STORE_CTX_set_error(ctx,X509_V_ERR_CERT_CHAIN_TOO_LONG);
+ }
+ }
+ switch (ctx->error)
+ {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+ X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,256);
+ BIO_printf(bio_err,"issuer= %s\n",buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ BIO_printf(bio_err,"notBefore=");
+ ASN1_UTCTIME_print(bio_err,X509_get_notBefore(ctx->current_cert));
+ BIO_printf(bio_err,"\n");
+ break;
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ BIO_printf(bio_err,"notAfter=");
+ ASN1_UTCTIME_print(bio_err,X509_get_notAfter(ctx->current_cert));
+ BIO_printf(bio_err,"\n");
+ break;
+ }
+ BIO_printf(bio_err,"verify return:%d\n",ok);
+ return(ok);
+ }
diff --git a/main/openssl/crypto/pkcs7/des.pem b/main/openssl/crypto/pkcs7/des.pem
new file mode 100644
index 00000000..62d1657e
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/des.pem
@@ -0,0 +1,15 @@
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHmMIHwAgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEG
+A1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNUUkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQD
+ExJERU1PIFpFUk8gVkFMVUUgQ0ECAgR+MA0GCSqGSIb3DQEBAQUABEC2vXI1xQDW6lUHM3zQ
+/9uBEBOO5A3TtkrklAXq7v01gsIC21t52qSk36REXY+slhNZ0OQ349tgkTsoETHFLoEwMIHw
+AgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMI
+QnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29mdCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNU
+UkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQDExJERU1PIFpFUk8gVkFMVUUgQ0ECAgR9MA0G
+CSqGSIb3DQEBAQUABEB8ujxbabxXUYJhopuDm3oDq4JNqX6Io4p3ro+ShqfIndsXTZ1v5a2N
+WtLLCWlHn/habjBwZ/DgQgcKASbZ7QxNMIAGCSqGSIb3DQEHATAaBggqhkiG9w0DAjAOAgIA
+oAQIbsL5v1wX98KggAQoAaJ4WHm68fXY1WE5OIjfVBIDpO1K+i8dmKhjnAjrjoyZ9Bwc8rDL
+lgQg4CXb805h5xl+GfvSwUaHJayte1m2mcOhs3J2YyqbQ+MEIMIiJQccmhO3oDKm36CFvYR8
+5PjpclVcZyX2ngbwPFMnBAgy0clOAE6UKAAAAAAAAAAAAAA=
+
diff --git a/main/openssl/crypto/pkcs7/doc b/main/openssl/crypto/pkcs7/doc
new file mode 100644
index 00000000..d2e8b7b2
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/doc
@@ -0,0 +1,24 @@
+int PKCS7_set_content_type(PKCS7 *p7, int type);
+Call to set the type of PKCS7 object we are working on
+
+int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
+ EVP_MD *dgst);
+Use this to setup a signer info
+There will also be functions to add signed and unsigned attributes.
+
+int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
+Add a signer info to the content.
+
+int PKCS7_add_certificae(PKCS7 *p7, X509 *x509);
+int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
+
+----
+
+p7=PKCS7_new();
+PKCS7_set_content_type(p7,NID_pkcs7_signed);
+
+signer=PKCS7_SINGNER_INFO_new();
+PKCS7_SIGNER_INFO_set(signer,x509,pkey,EVP_md5());
+PKCS7_add_signer(py,signer);
+
+we are now setup.
diff --git a/main/openssl/crypto/pkcs7/enc.c b/main/openssl/crypto/pkcs7/enc.c
new file mode 100644
index 00000000..7417f8a4
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/enc.c
@@ -0,0 +1,174 @@
+/* crypto/pkcs7/enc.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+#include <stdio.h>
+#include <string.h>
+#include <openssl/bio.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+
+int main(argc,argv)
+int argc;
+char *argv[];
+ {
+ X509 *x509;
+ PKCS7 *p7;
+ BIO *in;
+ BIO *data,*p7bio;
+ char buf[1024*4];
+ int i;
+ int nodetach=1;
+ char *keyfile = NULL;
+ const EVP_CIPHER *cipher=NULL;
+ STACK_OF(X509) *recips=NULL;
+
+ OpenSSL_add_all_algorithms();
+
+ data=BIO_new(BIO_s_file());
+ while(argc > 1)
+ {
+ if (strcmp(argv[1],"-nd") == 0)
+ {
+ nodetach=1;
+ argv++; argc--;
+ }
+ else if ((strcmp(argv[1],"-c") == 0) && (argc >= 2)) {
+ if(!(cipher = EVP_get_cipherbyname(argv[2]))) {
+ fprintf(stderr, "Unknown cipher %s\n", argv[2]);
+ goto err;
+ }
+ argc-=2;
+ argv+=2;
+ } else if ((strcmp(argv[1],"-k") == 0) && (argc >= 2)) {
+ keyfile = argv[2];
+ argc-=2;
+ argv+=2;
+ if (!(in=BIO_new_file(keyfile,"r"))) goto err;
+ if (!(x509=PEM_read_bio_X509(in,NULL,NULL,NULL)))
+ goto err;
+ if(!recips) recips = sk_X509_new_null();
+ sk_X509_push(recips, x509);
+ BIO_free(in);
+ } else break;
+ }
+
+ if(!recips) {
+ fprintf(stderr, "No recipients\n");
+ goto err;
+ }
+
+ if (!BIO_read_filename(data,argv[1])) goto err;
+
+ p7=PKCS7_new();
+#if 0
+ BIO_reset(in);
+ if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err;
+ BIO_free(in);
+ PKCS7_set_type(p7,NID_pkcs7_signedAndEnveloped);
+
+ if (PKCS7_add_signature(p7,x509,pkey,EVP_sha1()) == NULL) goto err;
+ /* we may want to add more */
+ PKCS7_add_certificate(p7,x509);
+#else
+ PKCS7_set_type(p7,NID_pkcs7_enveloped);
+#endif
+ if(!cipher) {
+#ifndef OPENSSL_NO_DES
+ cipher = EVP_des_ede3_cbc();
+#else
+ fprintf(stderr, "No cipher selected\n");
+ goto err;
+#endif
+ }
+
+ if (!PKCS7_set_cipher(p7,cipher)) goto err;
+ for(i = 0; i < sk_X509_num(recips); i++) {
+ if (!PKCS7_add_recipient(p7,sk_X509_value(recips, i))) goto err;
+ }
+ sk_X509_pop_free(recips, X509_free);
+
+ /* Set the content of the signed to 'data' */
+ /* PKCS7_content_new(p7,NID_pkcs7_data); not used in envelope */
+
+ /* could be used, but not in this version :-)
+ if (!nodetach) PKCS7_set_detached(p7,1);
+ */
+
+ if ((p7bio=PKCS7_dataInit(p7,NULL)) == NULL) goto err;
+
+ for (;;)
+ {
+ i=BIO_read(data,buf,sizeof(buf));
+ if (i <= 0) break;
+ BIO_write(p7bio,buf,i);
+ }
+ BIO_flush(p7bio);
+
+ if (!PKCS7_dataFinal(p7,p7bio)) goto err;
+ BIO_free(p7bio);
+
+ PEM_write_PKCS7(stdout,p7);
+ PKCS7_free(p7);
+
+ exit(0);
+err:
+ ERR_load_crypto_strings();
+ ERR_print_errors_fp(stderr);
+ exit(1);
+ }
+
diff --git a/main/openssl/crypto/pkcs7/es1.pem b/main/openssl/crypto/pkcs7/es1.pem
new file mode 100644
index 00000000..47112a23
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/es1.pem
@@ -0,0 +1,66 @@
+-----BEGIN PKCS7-----
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHmMIHwAgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEG
+A1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNUUkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQD
+ExJERU1PIFpFUk8gVkFMVUUgQ0ECAgRuMA0GCSqGSIb3DQEBAQUABEDWak0y/5XZJhQJeCLo
+KECcHXkTEbjzYkYNHIinbiPmRK4QbNfs9z2mA3z/c2ykQ4eAqFR2jyNrUMN/+I5XEiv6MIHw
+AgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMI
+QnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29mdCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNU
+UkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQDExJERU1PIFpFUk8gVkFMVUUgQ0ECAgR9MA0G
+CSqGSIb3DQEBAQUABEAWg9+KgtCjc77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I+XW7GkfL+ekECCCCg2reMyGDBAh1PYqkg3lw3gQQkNlggEPU+BH8eh7Gm7n7
+7AQIjC5EWbkil5cEEKcpuqwTWww/X89KnQAg8TcECJPomqHvrlZFBBiRSuIiHpmN+PaujXpv
+qZV2VhjkB2j09GEECOIdv8AVOJgKBAjlHgIqAD9jZQQIXHbs44+wogcEIGGqTACRJxrhMcMG
+X8drNjksIPt+snxTXUBIkTVpZWoABAh6unXPTyIr8QQgBF8xKoX27MWk7iTNmkSNZggZXa2a
+DWCGHSYLngbSOHIECD9XmO6VsvTgBAjfqB70CEW4WwQIVIBkbCocznUEEHB/zFXy/sR4OYHe
+UfbNPnIEEDWBB/NTCLMGE+o8BfyujcAECFik7GQnnF9VBBAhLXExQeWAofZNc6NtN7qZBCC1
+gVIS3ruTwKltmcrgx3heT3M8ZJhCfWa+6KzchnmKygQQ+1NL5sSzR4m/fdrqxHFyUAQYCT2x
+PamQr3wK3h0lyZER+4H0zPM86AhFBBC3CkmvL2vjflMfujnzPBVpBBge9rMbI5+0q9DLrTiT
+5F3AIgXLpD8PQWAECHkHVo6RomV3BAgMbi8E271UeAQIqtS8wnI3XngECG3TWmOMb3/iBEha
+y+mvCS6I3n3JfL8e1B5P4qX9/czJRaERLuKpGNjLiL4A+zxN0LZ0UHd0qfmJjwOTxAx3iJAC
+lGXX4nB9ATYPUT5EU+o1Y4sECN01pP6vWNIdBDAsiE0Ts8/9ltJlqX2B3AoOM4qOt9EaCjXf
+lB+aEmrhtjUwuZ6GqS5Ke7P6XnakTk4ECCLIMatNdootAAAAAAAAAAAAAA==
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/example.c b/main/openssl/crypto/pkcs7/example.c
new file mode 100644
index 00000000..2953d04b
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/example.c
@@ -0,0 +1,329 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <openssl/pkcs7.h>
+#include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
+
+int add_signed_time(PKCS7_SIGNER_INFO *si)
+ {
+ ASN1_UTCTIME *sign_time;
+
+ /* The last parameter is the amount to add/subtract from the current
+ * time (in seconds) */
+ sign_time=X509_gmtime_adj(NULL,0);
+ PKCS7_add_signed_attribute(si,NID_pkcs9_signingTime,
+ V_ASN1_UTCTIME,(char *)sign_time);
+ return(1);
+ }
+
+ASN1_UTCTIME *get_signed_time(PKCS7_SIGNER_INFO *si)
+ {
+ ASN1_TYPE *so;
+
+ so=PKCS7_get_signed_attribute(si,NID_pkcs9_signingTime);
+ if (so->type == V_ASN1_UTCTIME)
+ return so->value.utctime;
+ return NULL;
+ }
+
+static int signed_string_nid= -1;
+
+void add_signed_string(PKCS7_SIGNER_INFO *si, char *str)
+ {
+ ASN1_OCTET_STRING *os;
+
+ /* To a an object of OID 1.2.3.4.5, which is an octet string */
+ if (signed_string_nid == -1)
+ signed_string_nid=
+ OBJ_create("1.2.3.4.5","OID_example","Our example OID");
+ os=ASN1_OCTET_STRING_new();
+ ASN1_OCTET_STRING_set(os,(unsigned char*)str,strlen(str));
+ /* When we add, we do not free */
+ PKCS7_add_signed_attribute(si,signed_string_nid,
+ V_ASN1_OCTET_STRING,(char *)os);
+ }
+
+int get_signed_string(PKCS7_SIGNER_INFO *si, char *buf, int len)
+ {
+ ASN1_TYPE *so;
+ ASN1_OCTET_STRING *os;
+ int i;
+
+ if (signed_string_nid == -1)
+ signed_string_nid=
+ OBJ_create("1.2.3.4.5","OID_example","Our example OID");
+ /* To retrieve */
+ so=PKCS7_get_signed_attribute(si,signed_string_nid);
+ if (so != NULL)
+ {
+ if (so->type == V_ASN1_OCTET_STRING)
+ {
+ os=so->value.octet_string;
+ i=os->length;
+ if ((i+1) > len)
+ i=len-1;
+ memcpy(buf,os->data,i);
+ return(i);
+ }
+ }
+ return(0);
+ }
+
+static int signed_seq2string_nid= -1;
+/* ########################################### */
+int add_signed_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2)
+ {
+ /* To add an object of OID 1.9.999, which is a sequence containing
+ * 2 octet strings */
+ unsigned char *p;
+ ASN1_OCTET_STRING *os1,*os2;
+ ASN1_STRING *seq;
+ unsigned char *data;
+ int i,total;
+
+ if (signed_seq2string_nid == -1)
+ signed_seq2string_nid=
+ OBJ_create("1.9.9999","OID_example","Our example OID");
+
+ os1=ASN1_OCTET_STRING_new();
+ os2=ASN1_OCTET_STRING_new();
+ ASN1_OCTET_STRING_set(os1,(unsigned char*)str1,strlen(str1));
+ ASN1_OCTET_STRING_set(os2,(unsigned char*)str1,strlen(str1));
+ i =i2d_ASN1_OCTET_STRING(os1,NULL);
+ i+=i2d_ASN1_OCTET_STRING(os2,NULL);
+ total=ASN1_object_size(1,i,V_ASN1_SEQUENCE);
+
+ data=malloc(total);
+ p=data;
+ ASN1_put_object(&p,1,i,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL);
+ i2d_ASN1_OCTET_STRING(os1,&p);
+ i2d_ASN1_OCTET_STRING(os2,&p);
+
+ seq=ASN1_STRING_new();
+ ASN1_STRING_set(seq,data,total);
+ free(data);
+ ASN1_OCTET_STRING_free(os1);
+ ASN1_OCTET_STRING_free(os2);
+
+ PKCS7_add_signed_attribute(si,signed_seq2string_nid,
+ V_ASN1_SEQUENCE,(char *)seq);
+ return(1);
+ }
+
+/* For this case, I will malloc the return strings */
+int get_signed_seq2string(PKCS7_SIGNER_INFO *si, char **str1, char **str2)
+ {
+ ASN1_TYPE *so;
+
+ if (signed_seq2string_nid == -1)
+ signed_seq2string_nid=
+ OBJ_create("1.9.9999","OID_example","Our example OID");
+ /* To retrieve */
+ so=PKCS7_get_signed_attribute(si,signed_seq2string_nid);
+ if (so && (so->type == V_ASN1_SEQUENCE))
+ {
+ ASN1_const_CTX c;
+ ASN1_STRING *s;
+ long length;
+ ASN1_OCTET_STRING *os1,*os2;
+
+ s=so->value.sequence;
+ c.p=ASN1_STRING_data(s);
+ c.max=c.p+ASN1_STRING_length(s);
+ if (!asn1_GetSequence(&c,&length)) goto err;
+ /* Length is the length of the seqence */
+
+ c.q=c.p;
+ if ((os1=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL)
+ goto err;
+ c.slen-=(c.p-c.q);
+
+ c.q=c.p;
+ if ((os2=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL)
+ goto err;
+ c.slen-=(c.p-c.q);
+
+ if (!asn1_const_Finish(&c)) goto err;
+ *str1=malloc(os1->length+1);
+ *str2=malloc(os2->length+1);
+ memcpy(*str1,os1->data,os1->length);
+ memcpy(*str2,os2->data,os2->length);
+ (*str1)[os1->length]='\0';
+ (*str2)[os2->length]='\0';
+ ASN1_OCTET_STRING_free(os1);
+ ASN1_OCTET_STRING_free(os2);
+ return(1);
+ }
+err:
+ return(0);
+ }
+
+
+/* #######################################
+ * THE OTHER WAY TO DO THINGS
+ * #######################################
+ */
+X509_ATTRIBUTE *create_time(void)
+ {
+ ASN1_UTCTIME *sign_time;
+ X509_ATTRIBUTE *ret;
+
+ /* The last parameter is the amount to add/subtract from the current
+ * time (in seconds) */
+ sign_time=X509_gmtime_adj(NULL,0);
+ ret=X509_ATTRIBUTE_create(NID_pkcs9_signingTime,
+ V_ASN1_UTCTIME,(char *)sign_time);
+ return(ret);
+ }
+
+ASN1_UTCTIME *sk_get_time(STACK_OF(X509_ATTRIBUTE) *sk)
+ {
+ ASN1_TYPE *so;
+ PKCS7_SIGNER_INFO si;
+
+ si.auth_attr=sk;
+ so=PKCS7_get_signed_attribute(&si,NID_pkcs9_signingTime);
+ if (so->type == V_ASN1_UTCTIME)
+ return so->value.utctime;
+ return NULL;
+ }
+
+X509_ATTRIBUTE *create_string(char *str)
+ {
+ ASN1_OCTET_STRING *os;
+ X509_ATTRIBUTE *ret;
+
+ /* To a an object of OID 1.2.3.4.5, which is an octet string */
+ if (signed_string_nid == -1)
+ signed_string_nid=
+ OBJ_create("1.2.3.4.5","OID_example","Our example OID");
+ os=ASN1_OCTET_STRING_new();
+ ASN1_OCTET_STRING_set(os,(unsigned char*)str,strlen(str));
+ /* When we add, we do not free */
+ ret=X509_ATTRIBUTE_create(signed_string_nid,
+ V_ASN1_OCTET_STRING,(char *)os);
+ return(ret);
+ }
+
+int sk_get_string(STACK_OF(X509_ATTRIBUTE) *sk, char *buf, int len)
+ {
+ ASN1_TYPE *so;
+ ASN1_OCTET_STRING *os;
+ int i;
+ PKCS7_SIGNER_INFO si;
+
+ si.auth_attr=sk;
+
+ if (signed_string_nid == -1)
+ signed_string_nid=
+ OBJ_create("1.2.3.4.5","OID_example","Our example OID");
+ /* To retrieve */
+ so=PKCS7_get_signed_attribute(&si,signed_string_nid);
+ if (so != NULL)
+ {
+ if (so->type == V_ASN1_OCTET_STRING)
+ {
+ os=so->value.octet_string;
+ i=os->length;
+ if ((i+1) > len)
+ i=len-1;
+ memcpy(buf,os->data,i);
+ return(i);
+ }
+ }
+ return(0);
+ }
+
+X509_ATTRIBUTE *add_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2)
+ {
+ /* To add an object of OID 1.9.999, which is a sequence containing
+ * 2 octet strings */
+ unsigned char *p;
+ ASN1_OCTET_STRING *os1,*os2;
+ ASN1_STRING *seq;
+ X509_ATTRIBUTE *ret;
+ unsigned char *data;
+ int i,total;
+
+ if (signed_seq2string_nid == -1)
+ signed_seq2string_nid=
+ OBJ_create("1.9.9999","OID_example","Our example OID");
+
+ os1=ASN1_OCTET_STRING_new();
+ os2=ASN1_OCTET_STRING_new();
+ ASN1_OCTET_STRING_set(os1,(unsigned char*)str1,strlen(str1));
+ ASN1_OCTET_STRING_set(os2,(unsigned char*)str1,strlen(str1));
+ i =i2d_ASN1_OCTET_STRING(os1,NULL);
+ i+=i2d_ASN1_OCTET_STRING(os2,NULL);
+ total=ASN1_object_size(1,i,V_ASN1_SEQUENCE);
+
+ data=malloc(total);
+ p=data;
+ ASN1_put_object(&p,1,i,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL);
+ i2d_ASN1_OCTET_STRING(os1,&p);
+ i2d_ASN1_OCTET_STRING(os2,&p);
+
+ seq=ASN1_STRING_new();
+ ASN1_STRING_set(seq,data,total);
+ free(data);
+ ASN1_OCTET_STRING_free(os1);
+ ASN1_OCTET_STRING_free(os2);
+
+ ret=X509_ATTRIBUTE_create(signed_seq2string_nid,
+ V_ASN1_SEQUENCE,(char *)seq);
+ return(ret);
+ }
+
+/* For this case, I will malloc the return strings */
+int sk_get_seq2string(STACK_OF(X509_ATTRIBUTE) *sk, char **str1, char **str2)
+ {
+ ASN1_TYPE *so;
+ PKCS7_SIGNER_INFO si;
+
+ if (signed_seq2string_nid == -1)
+ signed_seq2string_nid=
+ OBJ_create("1.9.9999","OID_example","Our example OID");
+
+ si.auth_attr=sk;
+ /* To retrieve */
+ so=PKCS7_get_signed_attribute(&si,signed_seq2string_nid);
+ if (so->type == V_ASN1_SEQUENCE)
+ {
+ ASN1_const_CTX c;
+ ASN1_STRING *s;
+ long length;
+ ASN1_OCTET_STRING *os1,*os2;
+
+ s=so->value.sequence;
+ c.p=ASN1_STRING_data(s);
+ c.max=c.p+ASN1_STRING_length(s);
+ if (!asn1_GetSequence(&c,&length)) goto err;
+ /* Length is the length of the seqence */
+
+ c.q=c.p;
+ if ((os1=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL)
+ goto err;
+ c.slen-=(c.p-c.q);
+
+ c.q=c.p;
+ if ((os2=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL)
+ goto err;
+ c.slen-=(c.p-c.q);
+
+ if (!asn1_const_Finish(&c)) goto err;
+ *str1=malloc(os1->length+1);
+ *str2=malloc(os2->length+1);
+ memcpy(*str1,os1->data,os1->length);
+ memcpy(*str2,os2->data,os2->length);
+ (*str1)[os1->length]='\0';
+ (*str2)[os2->length]='\0';
+ ASN1_OCTET_STRING_free(os1);
+ ASN1_OCTET_STRING_free(os2);
+ return(1);
+ }
+err:
+ return(0);
+ }
+
+
diff --git a/main/openssl/crypto/pkcs7/example.h b/main/openssl/crypto/pkcs7/example.h
new file mode 100644
index 00000000..96167de1
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/example.h
@@ -0,0 +1,57 @@
+/* ====================================================================
+ * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+int add_signed_time(PKCS7_SIGNER_INFO *si);
+ASN1_UTCTIME *get_signed_time(PKCS7_SIGNER_INFO *si);
+int get_signed_seq2string(PKCS7_SIGNER_INFO *si, char **str1, char **str2);
diff --git a/main/openssl/crypto/pkcs7/info.pem b/main/openssl/crypto/pkcs7/info.pem
new file mode 100644
index 00000000..989baf87
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/info.pem
@@ -0,0 +1,57 @@
+issuer :/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=DEMONSTRATION AND TESTING/CN=DEMO ZERO VALUE CA
+subject:/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=SMIME 003/CN=Information/Email=info@cryptsoft.com
+serial :047D
+
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 1149 (0x47d)
+ Signature Algorithm: md5withRSAEncryption
+ Issuer: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=DEMONSTRATION AND TESTING, CN=DEMO ZERO VALUE CA
+ Validity
+ Not Before: May 13 05:40:58 1998 GMT
+ Not After : May 12 05:40:58 2000 GMT
+ Subject: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=SMIME 003, CN=Information/Email=info@cryptsoft.com
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Modulus:
+ 00:ad:e7:23:89:ee:0d:87:b7:9c:32:44:4b:95:81:
+ 73:dd:22:80:4b:2d:c5:60:b8:fe:1e:18:63:ef:dc:
+ 89:89:22:df:95:3c:7a:db:3d:9a:06:a8:08:d6:29:
+ fd:ef:41:09:91:ed:bc:ad:98:f9:f6:28:90:62:6f:
+ e7:e7:0c:4d:0b
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ Netscape Comment:
+ Generated with SSLeay
+ Signature Algorithm: md5withRSAEncryption
+ 52:15:ea:88:f4:f0:f9:0b:ef:ce:d5:f8:83:40:61:16:5e:55:
+ f9:ce:2d:d1:8b:31:5c:03:c6:2d:10:7c:61:d5:5c:0a:42:97:
+ d1:fd:65:b6:b6:84:a5:39:ec:46:ec:fc:e0:0d:d9:22:da:1b:
+ 50:74:ad:92:cb:4e:90:e5:fa:7d
+
+-----BEGIN CERTIFICATE-----
+MIICTDCCAfagAwIBAgICBH0wDQYJKoZIhvcNAQEEBQAwgZIxCzAJBgNVBAYTAkFV
+MRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UE
+ChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVBAsTGURFTU9OU1RSQVRJT04gQU5E
+IFRFU1RJTkcxGzAZBgNVBAMTEkRFTU8gWkVSTyBWQUxVRSBDQTAeFw05ODA1MTMw
+NTQwNThaFw0wMDA1MTIwNTQwNThaMIGeMQswCQYDVQQGEwJBVTETMBEGA1UECBMK
+UXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMRIwEAYDVQQLEwlTTUlNRSAwMDMxFDASBgNVBAMTC0luZm9ybWF0
+aW9uMSEwHwYJKoZIhvcNAQkBFhJpbmZvQGNyeXB0c29mdC5jb20wXDANBgkqhkiG
+9w0BAQEFAANLADBIAkEArecjie4Nh7ecMkRLlYFz3SKASy3FYLj+Hhhj79yJiSLf
+lTx62z2aBqgI1in970EJke28rZj59iiQYm/n5wxNCwIDAQABoygwJjAkBglghkgB
+hvhCAQ0EFxYVR2VuZXJhdGVkIHdpdGggU1NMZWF5MA0GCSqGSIb3DQEBBAUAA0EA
+UhXqiPTw+QvvztX4g0BhFl5V+c4t0YsxXAPGLRB8YdVcCkKX0f1ltraEpTnsRuz8
+4A3ZItobUHStkstOkOX6fQ==
+-----END CERTIFICATE-----
+
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOgIBAAJBAK3nI4nuDYe3nDJES5WBc90igEstxWC4/h4YY+/ciYki35U8ets9
+mgaoCNYp/e9BCZHtvK2Y+fYokGJv5+cMTQsCAwEAAQJBAIHpvXvqEcOEoDRRHuIG
+fkcB4jPHcr9KE9TpxabH6xs9beN6OJnkePXAHwaz5MnUgSnbpOKq+cw8miKjXwe/
+zVECIQDVLwncT2lRmXarEYHzb+q/0uaSvKhWKKt3kJasLNTrAwIhANDUc/ghut29
+p3jJYjurzUKuG774/5eLjPLsxPPIZzNZAiA/10hSq41UnGqHLEUIS9m2/EeEZe7b
+bm567dfRU9OnVQIgDo8ROrZXSchEGbaog5J5r/Fle83uO8l93R3GqVxKXZkCIFfk
+IPD5PIYQAyyod3hyKKza7ZP4CGY4oOfZetbkSGGG
+-----END RSA PRIVATE KEY-----
diff --git a/main/openssl/crypto/pkcs7/infokey.pem b/main/openssl/crypto/pkcs7/infokey.pem
new file mode 100644
index 00000000..1e2acc95
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/infokey.pem
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOgIBAAJBAK3nI4nuDYe3nDJES5WBc90igEstxWC4/h4YY+/ciYki35U8ets9
+mgaoCNYp/e9BCZHtvK2Y+fYokGJv5+cMTQsCAwEAAQJBAIHpvXvqEcOEoDRRHuIG
+fkcB4jPHcr9KE9TpxabH6xs9beN6OJnkePXAHwaz5MnUgSnbpOKq+cw8miKjXwe/
+zVECIQDVLwncT2lRmXarEYHzb+q/0uaSvKhWKKt3kJasLNTrAwIhANDUc/ghut29
+p3jJYjurzUKuG774/5eLjPLsxPPIZzNZAiA/10hSq41UnGqHLEUIS9m2/EeEZe7b
+bm567dfRU9OnVQIgDo8ROrZXSchEGbaog5J5r/Fle83uO8l93R3GqVxKXZkCIFfk
+IPD5PIYQAyyod3hyKKza7ZP4CGY4oOfZetbkSGGG
+-----END RSA PRIVATE KEY-----
diff --git a/main/openssl/crypto/pkcs7/p7/a1 b/main/openssl/crypto/pkcs7/p7/a1
new file mode 100644
index 00000000..56ca9437
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/p7/a1
@@ -0,0 +1,2 @@
+j,H>_æá_­DôzEîLœ VJ³ß觬¤””E3ûáYäx%_Àk
+3ê)DLScñ8% ôM \ No newline at end of file
diff --git a/main/openssl/crypto/pkcs7/p7/a2 b/main/openssl/crypto/pkcs7/p7/a2
new file mode 100644
index 00000000..23d8fb5e
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/p7/a2
@@ -0,0 +1 @@
+k~@a”,NâM͹¼ <O( KP—騠¤K²>­×U¿o_½BqrmÎ?Ù t?t÷ÏéId2‰Š \ No newline at end of file
diff --git a/main/openssl/crypto/pkcs7/p7/cert.p7c b/main/openssl/crypto/pkcs7/p7/cert.p7c
new file mode 100644
index 00000000..2b75ec05
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/p7/cert.p7c
Binary files differ
diff --git a/main/openssl/crypto/pkcs7/p7/smime.p7m b/main/openssl/crypto/pkcs7/p7/smime.p7m
new file mode 100644
index 00000000..2b6e6f82
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/p7/smime.p7m
Binary files differ
diff --git a/main/openssl/crypto/pkcs7/p7/smime.p7s b/main/openssl/crypto/pkcs7/p7/smime.p7s
new file mode 100644
index 00000000..2b5d4fb0
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/p7/smime.p7s
Binary files differ
diff --git a/main/openssl/crypto/pkcs7/pk7_asn1.c b/main/openssl/crypto/pkcs7/pk7_asn1.c
new file mode 100644
index 00000000..b7ec2883
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_asn1.c
@@ -0,0 +1,247 @@
+/* pk7_asn.c */
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ * project 2000.
+ */
+/* ====================================================================
+ * Copyright (c) 2000 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * licensing@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/asn1t.h>
+#include <openssl/pkcs7.h>
+#include <openssl/x509.h>
+
+/* PKCS#7 ASN1 module */
+
+/* This is the ANY DEFINED BY table for the top level PKCS#7 structure */
+
+ASN1_ADB_TEMPLATE(p7default) = ASN1_EXP_OPT(PKCS7, d.other, ASN1_ANY, 0);
+
+ASN1_ADB(PKCS7) = {
+ ADB_ENTRY(NID_pkcs7_data, ASN1_NDEF_EXP_OPT(PKCS7, d.data, ASN1_OCTET_STRING_NDEF, 0)),
+ ADB_ENTRY(NID_pkcs7_signed, ASN1_NDEF_EXP_OPT(PKCS7, d.sign, PKCS7_SIGNED, 0)),
+ ADB_ENTRY(NID_pkcs7_enveloped, ASN1_NDEF_EXP_OPT(PKCS7, d.enveloped, PKCS7_ENVELOPE, 0)),
+ ADB_ENTRY(NID_pkcs7_signedAndEnveloped, ASN1_NDEF_EXP_OPT(PKCS7, d.signed_and_enveloped, PKCS7_SIGN_ENVELOPE, 0)),
+ ADB_ENTRY(NID_pkcs7_digest, ASN1_NDEF_EXP_OPT(PKCS7, d.digest, PKCS7_DIGEST, 0)),
+ ADB_ENTRY(NID_pkcs7_encrypted, ASN1_NDEF_EXP_OPT(PKCS7, d.encrypted, PKCS7_ENCRYPT, 0))
+} ASN1_ADB_END(PKCS7, 0, type, 0, &p7default_tt, NULL);
+
+/* PKCS#7 streaming support */
+static int pk7_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
+ void *exarg)
+{
+ ASN1_STREAM_ARG *sarg = exarg;
+ PKCS7 **pp7 = (PKCS7 **)pval;
+
+ switch(operation)
+ {
+
+ case ASN1_OP_STREAM_PRE:
+ if (PKCS7_stream(&sarg->boundary, *pp7) <= 0)
+ return 0;
+ case ASN1_OP_DETACHED_PRE:
+ sarg->ndef_bio = PKCS7_dataInit(*pp7, sarg->out);
+ if (!sarg->ndef_bio)
+ return 0;
+ break;
+
+ case ASN1_OP_STREAM_POST:
+ case ASN1_OP_DETACHED_POST:
+ if (PKCS7_dataFinal(*pp7, sarg->ndef_bio) <= 0)
+ return 0;
+ break;
+
+ }
+ return 1;
+}
+
+ASN1_NDEF_SEQUENCE_cb(PKCS7, pk7_cb) = {
+ ASN1_SIMPLE(PKCS7, type, ASN1_OBJECT),
+ ASN1_ADB_OBJECT(PKCS7)
+}ASN1_NDEF_SEQUENCE_END_cb(PKCS7, PKCS7)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7)
+IMPLEMENT_ASN1_NDEF_FUNCTION(PKCS7)
+IMPLEMENT_ASN1_DUP_FUNCTION(PKCS7)
+
+ASN1_NDEF_SEQUENCE(PKCS7_SIGNED) = {
+ ASN1_SIMPLE(PKCS7_SIGNED, version, ASN1_INTEGER),
+ ASN1_SET_OF(PKCS7_SIGNED, md_algs, X509_ALGOR),
+ ASN1_SIMPLE(PKCS7_SIGNED, contents, PKCS7),
+ ASN1_IMP_SEQUENCE_OF_OPT(PKCS7_SIGNED, cert, X509, 0),
+ ASN1_IMP_SET_OF_OPT(PKCS7_SIGNED, crl, X509_CRL, 1),
+ ASN1_SET_OF(PKCS7_SIGNED, signer_info, PKCS7_SIGNER_INFO)
+} ASN1_NDEF_SEQUENCE_END(PKCS7_SIGNED)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_SIGNED)
+
+/* Minor tweak to operation: free up EVP_PKEY */
+static int si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
+ void *exarg)
+{
+ if(operation == ASN1_OP_FREE_POST) {
+ PKCS7_SIGNER_INFO *si = (PKCS7_SIGNER_INFO *)*pval;
+ EVP_PKEY_free(si->pkey);
+ }
+ return 1;
+}
+
+ASN1_SEQUENCE_cb(PKCS7_SIGNER_INFO, si_cb) = {
+ ASN1_SIMPLE(PKCS7_SIGNER_INFO, version, ASN1_INTEGER),
+ ASN1_SIMPLE(PKCS7_SIGNER_INFO, issuer_and_serial, PKCS7_ISSUER_AND_SERIAL),
+ ASN1_SIMPLE(PKCS7_SIGNER_INFO, digest_alg, X509_ALGOR),
+ /* NB this should be a SET OF but we use a SEQUENCE OF so the
+ * original order * is retained when the structure is reencoded.
+ * Since the attributes are implicitly tagged this will not affect
+ * the encoding.
+ */
+ ASN1_IMP_SEQUENCE_OF_OPT(PKCS7_SIGNER_INFO, auth_attr, X509_ATTRIBUTE, 0),
+ ASN1_SIMPLE(PKCS7_SIGNER_INFO, digest_enc_alg, X509_ALGOR),
+ ASN1_SIMPLE(PKCS7_SIGNER_INFO, enc_digest, ASN1_OCTET_STRING),
+ ASN1_IMP_SET_OF_OPT(PKCS7_SIGNER_INFO, unauth_attr, X509_ATTRIBUTE, 1)
+} ASN1_SEQUENCE_END_cb(PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)
+
+ASN1_SEQUENCE(PKCS7_ISSUER_AND_SERIAL) = {
+ ASN1_SIMPLE(PKCS7_ISSUER_AND_SERIAL, issuer, X509_NAME),
+ ASN1_SIMPLE(PKCS7_ISSUER_AND_SERIAL, serial, ASN1_INTEGER)
+} ASN1_SEQUENCE_END(PKCS7_ISSUER_AND_SERIAL)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)
+
+ASN1_NDEF_SEQUENCE(PKCS7_ENVELOPE) = {
+ ASN1_SIMPLE(PKCS7_ENVELOPE, version, ASN1_INTEGER),
+ ASN1_SET_OF(PKCS7_ENVELOPE, recipientinfo, PKCS7_RECIP_INFO),
+ ASN1_SIMPLE(PKCS7_ENVELOPE, enc_data, PKCS7_ENC_CONTENT)
+} ASN1_NDEF_SEQUENCE_END(PKCS7_ENVELOPE)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ENVELOPE)
+
+/* Minor tweak to operation: free up X509 */
+static int ri_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
+ void *exarg)
+{
+ if(operation == ASN1_OP_FREE_POST) {
+ PKCS7_RECIP_INFO *ri = (PKCS7_RECIP_INFO *)*pval;
+ X509_free(ri->cert);
+ }
+ return 1;
+}
+
+ASN1_SEQUENCE_cb(PKCS7_RECIP_INFO, ri_cb) = {
+ ASN1_SIMPLE(PKCS7_RECIP_INFO, version, ASN1_INTEGER),
+ ASN1_SIMPLE(PKCS7_RECIP_INFO, issuer_and_serial, PKCS7_ISSUER_AND_SERIAL),
+ ASN1_SIMPLE(PKCS7_RECIP_INFO, key_enc_algor, X509_ALGOR),
+ ASN1_SIMPLE(PKCS7_RECIP_INFO, enc_key, ASN1_OCTET_STRING)
+} ASN1_SEQUENCE_END_cb(PKCS7_RECIP_INFO, PKCS7_RECIP_INFO)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)
+
+ASN1_NDEF_SEQUENCE(PKCS7_ENC_CONTENT) = {
+ ASN1_SIMPLE(PKCS7_ENC_CONTENT, content_type, ASN1_OBJECT),
+ ASN1_SIMPLE(PKCS7_ENC_CONTENT, algorithm, X509_ALGOR),
+ ASN1_IMP_OPT(PKCS7_ENC_CONTENT, enc_data, ASN1_OCTET_STRING_NDEF, 0)
+} ASN1_NDEF_SEQUENCE_END(PKCS7_ENC_CONTENT)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)
+
+ASN1_NDEF_SEQUENCE(PKCS7_SIGN_ENVELOPE) = {
+ ASN1_SIMPLE(PKCS7_SIGN_ENVELOPE, version, ASN1_INTEGER),
+ ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, recipientinfo, PKCS7_RECIP_INFO),
+ ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, md_algs, X509_ALGOR),
+ ASN1_SIMPLE(PKCS7_SIGN_ENVELOPE, enc_data, PKCS7_ENC_CONTENT),
+ ASN1_IMP_SET_OF_OPT(PKCS7_SIGN_ENVELOPE, cert, X509, 0),
+ ASN1_IMP_SET_OF_OPT(PKCS7_SIGN_ENVELOPE, crl, X509_CRL, 1),
+ ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, signer_info, PKCS7_SIGNER_INFO)
+} ASN1_NDEF_SEQUENCE_END(PKCS7_SIGN_ENVELOPE)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)
+
+ASN1_NDEF_SEQUENCE(PKCS7_ENCRYPT) = {
+ ASN1_SIMPLE(PKCS7_ENCRYPT, version, ASN1_INTEGER),
+ ASN1_SIMPLE(PKCS7_ENCRYPT, enc_data, PKCS7_ENC_CONTENT)
+} ASN1_NDEF_SEQUENCE_END(PKCS7_ENCRYPT)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ENCRYPT)
+
+ASN1_NDEF_SEQUENCE(PKCS7_DIGEST) = {
+ ASN1_SIMPLE(PKCS7_DIGEST, version, ASN1_INTEGER),
+ ASN1_SIMPLE(PKCS7_DIGEST, md, X509_ALGOR),
+ ASN1_SIMPLE(PKCS7_DIGEST, contents, PKCS7),
+ ASN1_SIMPLE(PKCS7_DIGEST, digest, ASN1_OCTET_STRING)
+} ASN1_NDEF_SEQUENCE_END(PKCS7_DIGEST)
+
+IMPLEMENT_ASN1_FUNCTIONS(PKCS7_DIGEST)
+
+/* Specials for authenticated attributes */
+
+/* When signing attributes we want to reorder them to match the sorted
+ * encoding.
+ */
+
+ASN1_ITEM_TEMPLATE(PKCS7_ATTR_SIGN) =
+ ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SET_ORDER, 0, PKCS7_ATTRIBUTES, X509_ATTRIBUTE)
+ASN1_ITEM_TEMPLATE_END(PKCS7_ATTR_SIGN)
+
+/* When verifying attributes we need to use the received order. So
+ * we use SEQUENCE OF and tag it to SET OF
+ */
+
+ASN1_ITEM_TEMPLATE(PKCS7_ATTR_VERIFY) =
+ ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_IMPTAG | ASN1_TFLG_UNIVERSAL,
+ V_ASN1_SET, PKCS7_ATTRIBUTES, X509_ATTRIBUTE)
+ASN1_ITEM_TEMPLATE_END(PKCS7_ATTR_VERIFY)
+
+IMPLEMENT_ASN1_PRINT_FUNCTION(PKCS7)
diff --git a/main/openssl/crypto/pkcs7/pk7_attr.c b/main/openssl/crypto/pkcs7/pk7_attr.c
new file mode 100644
index 00000000..a97db512
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_attr.c
@@ -0,0 +1,165 @@
+/* pk7_attr.c */
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ * project 2001.
+ */
+/* ====================================================================
+ * Copyright (c) 2001-2004 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * licensing@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <openssl/bio.h>
+#include <openssl/asn1.h>
+#include <openssl/asn1t.h>
+#include <openssl/pem.h>
+#include <openssl/pkcs7.h>
+#include <openssl/x509.h>
+#include <openssl/err.h>
+
+int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR) *cap)
+{
+ ASN1_STRING *seq;
+ if(!(seq = ASN1_STRING_new())) {
+ PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ seq->length = ASN1_item_i2d((ASN1_VALUE *)cap,&seq->data,
+ ASN1_ITEM_rptr(X509_ALGORS));
+ return PKCS7_add_signed_attribute(si, NID_SMIMECapabilities,
+ V_ASN1_SEQUENCE, seq);
+}
+
+STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si)
+ {
+ ASN1_TYPE *cap;
+ const unsigned char *p;
+
+ cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities);
+ if (!cap || (cap->type != V_ASN1_SEQUENCE))
+ return NULL;
+ p = cap->value.sequence->data;
+ return (STACK_OF(X509_ALGOR) *)
+ ASN1_item_d2i(NULL, &p, cap->value.sequence->length,
+ ASN1_ITEM_rptr(X509_ALGORS));
+ }
+
+/* Basic smime-capabilities OID and optional integer arg */
+int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg)
+{
+ X509_ALGOR *alg;
+
+ if(!(alg = X509_ALGOR_new())) {
+ PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ ASN1_OBJECT_free(alg->algorithm);
+ alg->algorithm = OBJ_nid2obj (nid);
+ if (arg > 0) {
+ ASN1_INTEGER *nbit;
+ if(!(alg->parameter = ASN1_TYPE_new())) {
+ PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ if(!(nbit = ASN1_INTEGER_new())) {
+ PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ if(!ASN1_INTEGER_set (nbit, arg)) {
+ PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ alg->parameter->value.integer = nbit;
+ alg->parameter->type = V_ASN1_INTEGER;
+ }
+ sk_X509_ALGOR_push (sk, alg);
+ return 1;
+}
+
+int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid)
+ {
+ if (PKCS7_get_signed_attribute(si, NID_pkcs9_contentType))
+ return 0;
+ if (!coid)
+ coid = OBJ_nid2obj(NID_pkcs7_data);
+ return PKCS7_add_signed_attribute(si, NID_pkcs9_contentType,
+ V_ASN1_OBJECT, coid);
+ }
+
+int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t)
+ {
+ if (!t && !(t=X509_gmtime_adj(NULL,0)))
+ {
+ PKCS7err(PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME,
+ ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ return PKCS7_add_signed_attribute(si, NID_pkcs9_signingTime,
+ V_ASN1_UTCTIME, t);
+ }
+
+int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
+ const unsigned char *md, int mdlen)
+ {
+ ASN1_OCTET_STRING *os;
+ os = ASN1_OCTET_STRING_new();
+ if (!os)
+ return 0;
+ if (!ASN1_STRING_set(os, md, mdlen)
+ || !PKCS7_add_signed_attribute(si, NID_pkcs9_messageDigest,
+ V_ASN1_OCTET_STRING, os))
+ {
+ ASN1_OCTET_STRING_free(os);
+ return 0;
+ }
+ return 1;
+ }
diff --git a/main/openssl/crypto/pkcs7/pk7_dgst.c b/main/openssl/crypto/pkcs7/pk7_dgst.c
new file mode 100644
index 00000000..90edfa50
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_dgst.c
@@ -0,0 +1,66 @@
+/* crypto/pkcs7/pk7_dgst.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/evp.h>
+#include <openssl/rand.h>
+#include <openssl/objects.h>
+#include <openssl/x509.h>
+#include <openssl/pkcs7.h>
+
diff --git a/main/openssl/crypto/pkcs7/pk7_doit.c b/main/openssl/crypto/pkcs7/pk7_doit.c
new file mode 100644
index 00000000..3bf1a367
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_doit.c
@@ -0,0 +1,1248 @@
+/* crypto/pkcs7/pk7_doit.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/rand.h>
+#include <openssl/objects.h>
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+#include <openssl/err.h>
+
+static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
+ void *value);
+static ASN1_TYPE *get_attribute(STACK_OF(X509_ATTRIBUTE) *sk, int nid);
+
+static int PKCS7_type_is_other(PKCS7* p7)
+ {
+ int isOther=1;
+
+ int nid=OBJ_obj2nid(p7->type);
+
+ switch( nid )
+ {
+ case NID_pkcs7_data:
+ case NID_pkcs7_signed:
+ case NID_pkcs7_enveloped:
+ case NID_pkcs7_signedAndEnveloped:
+ case NID_pkcs7_digest:
+ case NID_pkcs7_encrypted:
+ isOther=0;
+ break;
+ default:
+ isOther=1;
+ }
+
+ return isOther;
+
+ }
+
+static ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7)
+ {
+ if ( PKCS7_type_is_data(p7))
+ return p7->d.data;
+ if ( PKCS7_type_is_other(p7) && p7->d.other
+ && (p7->d.other->type == V_ASN1_OCTET_STRING))
+ return p7->d.other->value.octet_string;
+ return NULL;
+ }
+
+static int PKCS7_bio_add_digest(BIO **pbio, X509_ALGOR *alg)
+ {
+ BIO *btmp;
+ const EVP_MD *md;
+ if ((btmp=BIO_new(BIO_f_md())) == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_BIO_ADD_DIGEST,ERR_R_BIO_LIB);
+ goto err;
+ }
+
+ md=EVP_get_digestbyobj(alg->algorithm);
+ if (md == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_BIO_ADD_DIGEST,PKCS7_R_UNKNOWN_DIGEST_TYPE);
+ goto err;
+ }
+
+ BIO_set_md(btmp,md);
+ if (*pbio == NULL)
+ *pbio=btmp;
+ else if (!BIO_push(*pbio,btmp))
+ {
+ PKCS7err(PKCS7_F_PKCS7_BIO_ADD_DIGEST,ERR_R_BIO_LIB);
+ goto err;
+ }
+ btmp=NULL;
+
+ return 1;
+
+ err:
+ if (btmp)
+ BIO_free(btmp);
+ return 0;
+
+ }
+
+static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri,
+ unsigned char *key, int keylen)
+ {
+ EVP_PKEY_CTX *pctx = NULL;
+ EVP_PKEY *pkey = NULL;
+ unsigned char *ek = NULL;
+ int ret = 0;
+ size_t eklen;
+
+ pkey = X509_get_pubkey(ri->cert);
+
+ if (!pkey)
+ return 0;
+
+ pctx = EVP_PKEY_CTX_new(pkey, NULL);
+ if (!pctx)
+ return 0;
+
+ if (EVP_PKEY_encrypt_init(pctx) <= 0)
+ goto err;
+
+ if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_ENCRYPT,
+ EVP_PKEY_CTRL_PKCS7_ENCRYPT, 0, ri) <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_ENCODE_RINFO, PKCS7_R_CTRL_ERROR);
+ goto err;
+ }
+
+ if (EVP_PKEY_encrypt(pctx, NULL, &eklen, key, keylen) <= 0)
+ goto err;
+
+ ek = OPENSSL_malloc(eklen);
+
+ if (ek == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_ENCODE_RINFO, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+
+ if (EVP_PKEY_encrypt(pctx, ek, &eklen, key, keylen) <= 0)
+ goto err;
+
+ ASN1_STRING_set0(ri->enc_key, ek, eklen);
+ ek = NULL;
+
+ ret = 1;
+
+ err:
+ if (pkey)
+ EVP_PKEY_free(pkey);
+ if (pctx)
+ EVP_PKEY_CTX_free(pctx);
+ if (ek)
+ OPENSSL_free(ek);
+ return ret;
+
+ }
+
+
+static int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen,
+ PKCS7_RECIP_INFO *ri, EVP_PKEY *pkey)
+ {
+ EVP_PKEY_CTX *pctx = NULL;
+ unsigned char *ek = NULL;
+ size_t eklen;
+
+ int ret = 0;
+
+ pctx = EVP_PKEY_CTX_new(pkey, NULL);
+ if (!pctx)
+ return 0;
+
+ if (EVP_PKEY_decrypt_init(pctx) <= 0)
+ goto err;
+
+ if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DECRYPT,
+ EVP_PKEY_CTRL_PKCS7_DECRYPT, 0, ri) <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, PKCS7_R_CTRL_ERROR);
+ goto err;
+ }
+
+ if (EVP_PKEY_decrypt(pctx, NULL, &eklen,
+ ri->enc_key->data, ri->enc_key->length) <= 0)
+ goto err;
+
+ ek = OPENSSL_malloc(eklen);
+
+ if (ek == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+
+ if (EVP_PKEY_decrypt(pctx, ek, &eklen,
+ ri->enc_key->data, ri->enc_key->length) <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, ERR_R_EVP_LIB);
+ goto err;
+ }
+
+ ret = 1;
+
+ *pek = ek;
+ *peklen = eklen;
+
+ err:
+ if (pctx)
+ EVP_PKEY_CTX_free(pctx);
+ if (!ret && ek)
+ OPENSSL_free(ek);
+
+ return ret;
+ }
+
+BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
+ {
+ int i;
+ BIO *out=NULL,*btmp=NULL;
+ X509_ALGOR *xa = NULL;
+ const EVP_CIPHER *evp_cipher=NULL;
+ STACK_OF(X509_ALGOR) *md_sk=NULL;
+ STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
+ X509_ALGOR *xalg=NULL;
+ PKCS7_RECIP_INFO *ri=NULL;
+ ASN1_OCTET_STRING *os=NULL;
+
+ i=OBJ_obj2nid(p7->type);
+ p7->state=PKCS7_S_HEADER;
+
+ switch (i)
+ {
+ case NID_pkcs7_signed:
+ md_sk=p7->d.sign->md_algs;
+ os = PKCS7_get_octet_string(p7->d.sign->contents);
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ rsk=p7->d.signed_and_enveloped->recipientinfo;
+ md_sk=p7->d.signed_and_enveloped->md_algs;
+ xalg=p7->d.signed_and_enveloped->enc_data->algorithm;
+ evp_cipher=p7->d.signed_and_enveloped->enc_data->cipher;
+ if (evp_cipher == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT,
+ PKCS7_R_CIPHER_NOT_INITIALIZED);
+ goto err;
+ }
+ break;
+ case NID_pkcs7_enveloped:
+ rsk=p7->d.enveloped->recipientinfo;
+ xalg=p7->d.enveloped->enc_data->algorithm;
+ evp_cipher=p7->d.enveloped->enc_data->cipher;
+ if (evp_cipher == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT,
+ PKCS7_R_CIPHER_NOT_INITIALIZED);
+ goto err;
+ }
+ break;
+ case NID_pkcs7_digest:
+ xa = p7->d.digest->md;
+ os = PKCS7_get_octet_string(p7->d.digest->contents);
+ break;
+ case NID_pkcs7_data:
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT,PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
+ goto err;
+ }
+
+ for (i=0; i<sk_X509_ALGOR_num(md_sk); i++)
+ if (!PKCS7_bio_add_digest(&out, sk_X509_ALGOR_value(md_sk, i)))
+ goto err;
+
+ if (xa && !PKCS7_bio_add_digest(&out, xa))
+ goto err;
+
+ if (evp_cipher != NULL)
+ {
+ unsigned char key[EVP_MAX_KEY_LENGTH];
+ unsigned char iv[EVP_MAX_IV_LENGTH];
+ int keylen,ivlen;
+ EVP_CIPHER_CTX *ctx;
+
+ if ((btmp=BIO_new(BIO_f_cipher())) == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT,ERR_R_BIO_LIB);
+ goto err;
+ }
+ BIO_get_cipher_ctx(btmp, &ctx);
+ keylen=EVP_CIPHER_key_length(evp_cipher);
+ ivlen=EVP_CIPHER_iv_length(evp_cipher);
+ xalg->algorithm = OBJ_nid2obj(EVP_CIPHER_type(evp_cipher));
+ if (ivlen > 0)
+ if (RAND_pseudo_bytes(iv,ivlen) <= 0)
+ goto err;
+ if (EVP_CipherInit_ex(ctx, evp_cipher, NULL, NULL, NULL, 1)<=0)
+ goto err;
+ if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
+ goto err;
+ if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1) <= 0)
+ goto err;
+
+ if (ivlen > 0) {
+ if (xalg->parameter == NULL) {
+ xalg->parameter = ASN1_TYPE_new();
+ if (xalg->parameter == NULL)
+ goto err;
+ }
+ if(EVP_CIPHER_param_to_asn1(ctx, xalg->parameter) < 0)
+ goto err;
+ }
+
+ /* Lets do the pub key stuff :-) */
+ for (i=0; i<sk_PKCS7_RECIP_INFO_num(rsk); i++)
+ {
+ ri=sk_PKCS7_RECIP_INFO_value(rsk,i);
+ if (pkcs7_encode_rinfo(ri, key, keylen) <= 0)
+ goto err;
+ }
+ OPENSSL_cleanse(key, keylen);
+
+ if (out == NULL)
+ out=btmp;
+ else
+ BIO_push(out,btmp);
+ btmp=NULL;
+ }
+
+ if (bio == NULL)
+ {
+ if (PKCS7_is_detached(p7))
+ bio=BIO_new(BIO_s_null());
+ else if (os && os->length > 0)
+ bio = BIO_new_mem_buf(os->data, os->length);
+ if(bio == NULL)
+ {
+ bio=BIO_new(BIO_s_mem());
+ if (bio == NULL)
+ goto err;
+ BIO_set_mem_eof_return(bio,0);
+ }
+ }
+ if (out)
+ BIO_push(out,bio);
+ else
+ out = bio;
+ bio=NULL;
+ if (0)
+ {
+err:
+ if (out != NULL)
+ BIO_free_all(out);
+ if (btmp != NULL)
+ BIO_free_all(btmp);
+ out=NULL;
+ }
+ return(out);
+ }
+
+static int pkcs7_cmp_ri(PKCS7_RECIP_INFO *ri, X509 *pcert)
+ {
+ int ret;
+ ret = X509_NAME_cmp(ri->issuer_and_serial->issuer,
+ pcert->cert_info->issuer);
+ if (ret)
+ return ret;
+ return M_ASN1_INTEGER_cmp(pcert->cert_info->serialNumber,
+ ri->issuer_and_serial->serial);
+ }
+
+/* int */
+BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
+ {
+ int i,j;
+ BIO *out=NULL,*btmp=NULL,*etmp=NULL,*bio=NULL;
+ X509_ALGOR *xa;
+ ASN1_OCTET_STRING *data_body=NULL;
+ const EVP_MD *evp_md;
+ const EVP_CIPHER *evp_cipher=NULL;
+ EVP_CIPHER_CTX *evp_ctx=NULL;
+ X509_ALGOR *enc_alg=NULL;
+ STACK_OF(X509_ALGOR) *md_sk=NULL;
+ STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
+ PKCS7_RECIP_INFO *ri=NULL;
+
+ i=OBJ_obj2nid(p7->type);
+ p7->state=PKCS7_S_HEADER;
+
+ switch (i)
+ {
+ case NID_pkcs7_signed:
+ data_body=PKCS7_get_octet_string(p7->d.sign->contents);
+ md_sk=p7->d.sign->md_algs;
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ rsk=p7->d.signed_and_enveloped->recipientinfo;
+ md_sk=p7->d.signed_and_enveloped->md_algs;
+ data_body=p7->d.signed_and_enveloped->enc_data->enc_data;
+ enc_alg=p7->d.signed_and_enveloped->enc_data->algorithm;
+ evp_cipher=EVP_get_cipherbyobj(enc_alg->algorithm);
+ if (evp_cipher == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE);
+ goto err;
+ }
+ break;
+ case NID_pkcs7_enveloped:
+ rsk=p7->d.enveloped->recipientinfo;
+ enc_alg=p7->d.enveloped->enc_data->algorithm;
+ data_body=p7->d.enveloped->enc_data->enc_data;
+ evp_cipher=EVP_get_cipherbyobj(enc_alg->algorithm);
+ if (evp_cipher == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE);
+ goto err;
+ }
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
+ goto err;
+ }
+
+ /* We will be checking the signature */
+ if (md_sk != NULL)
+ {
+ for (i=0; i<sk_X509_ALGOR_num(md_sk); i++)
+ {
+ xa=sk_X509_ALGOR_value(md_sk,i);
+ if ((btmp=BIO_new(BIO_f_md())) == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,ERR_R_BIO_LIB);
+ goto err;
+ }
+
+ j=OBJ_obj2nid(xa->algorithm);
+ evp_md=EVP_get_digestbynid(j);
+ if (evp_md == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNKNOWN_DIGEST_TYPE);
+ goto err;
+ }
+
+ BIO_set_md(btmp,evp_md);
+ if (out == NULL)
+ out=btmp;
+ else
+ BIO_push(out,btmp);
+ btmp=NULL;
+ }
+ }
+
+ if (evp_cipher != NULL)
+ {
+#if 0
+ unsigned char key[EVP_MAX_KEY_LENGTH];
+ unsigned char iv[EVP_MAX_IV_LENGTH];
+ unsigned char *p;
+ int keylen,ivlen;
+ int max;
+ X509_OBJECT ret;
+#endif
+ unsigned char *ek = NULL;
+ int eklen;
+
+ if ((etmp=BIO_new(BIO_f_cipher())) == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,ERR_R_BIO_LIB);
+ goto err;
+ }
+
+ /* It was encrypted, we need to decrypt the secret key
+ * with the private key */
+
+ /* Find the recipientInfo which matches the passed certificate
+ * (if any)
+ */
+
+ if (pcert)
+ {
+ for (i=0; i<sk_PKCS7_RECIP_INFO_num(rsk); i++)
+ {
+ ri=sk_PKCS7_RECIP_INFO_value(rsk,i);
+ if (!pkcs7_cmp_ri(ri, pcert))
+ break;
+ ri=NULL;
+ }
+ if (ri == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,
+ PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE);
+ goto err;
+ }
+ }
+
+ /* If we haven't got a certificate try each ri in turn */
+
+ if (pcert == NULL)
+ {
+ for (i=0; i<sk_PKCS7_RECIP_INFO_num(rsk); i++)
+ {
+ ri=sk_PKCS7_RECIP_INFO_value(rsk,i);
+ if (pkcs7_decrypt_rinfo(&ek, &eklen,
+ ri, pkey) > 0)
+ break;
+ ERR_clear_error();
+ ri = NULL;
+ }
+ if (ri == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,
+ PKCS7_R_NO_RECIPIENT_MATCHES_KEY);
+ goto err;
+ }
+ }
+ else
+ {
+ if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey) <= 0)
+ goto err;
+ }
+
+ evp_ctx=NULL;
+ BIO_get_cipher_ctx(etmp,&evp_ctx);
+ if (EVP_CipherInit_ex(evp_ctx,evp_cipher,NULL,NULL,NULL,0) <= 0)
+ goto err;
+ if (EVP_CIPHER_asn1_to_param(evp_ctx,enc_alg->parameter) < 0)
+ goto err;
+
+ if (eklen != EVP_CIPHER_CTX_key_length(evp_ctx)) {
+ /* Some S/MIME clients don't use the same key
+ * and effective key length. The key length is
+ * determined by the size of the decrypted RSA key.
+ */
+ if(!EVP_CIPHER_CTX_set_key_length(evp_ctx, eklen))
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE,
+ PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH);
+ goto err;
+ }
+ }
+ if (EVP_CipherInit_ex(evp_ctx,NULL,NULL,ek,NULL,0) <= 0)
+ goto err;
+
+ if (ek)
+ {
+ OPENSSL_cleanse(ek,eklen);
+ OPENSSL_free(ek);
+ }
+
+ if (out == NULL)
+ out=etmp;
+ else
+ BIO_push(out,etmp);
+ etmp=NULL;
+ }
+
+#if 1
+ if (PKCS7_is_detached(p7) || (in_bio != NULL))
+ {
+ bio=in_bio;
+ }
+ else
+ {
+#if 0
+ bio=BIO_new(BIO_s_mem());
+ /* We need to set this so that when we have read all
+ * the data, the encrypt BIO, if present, will read
+ * EOF and encode the last few bytes */
+ BIO_set_mem_eof_return(bio,0);
+
+ if (data_body->length > 0)
+ BIO_write(bio,(char *)data_body->data,data_body->length);
+#else
+ if (data_body->length > 0)
+ bio = BIO_new_mem_buf(data_body->data,data_body->length);
+ else {
+ bio=BIO_new(BIO_s_mem());
+ BIO_set_mem_eof_return(bio,0);
+ }
+ if (bio == NULL)
+ goto err;
+#endif
+ }
+ BIO_push(out,bio);
+ bio=NULL;
+#endif
+ if (0)
+ {
+err:
+ if (out != NULL) BIO_free_all(out);
+ if (btmp != NULL) BIO_free_all(btmp);
+ if (etmp != NULL) BIO_free_all(etmp);
+ if (bio != NULL) BIO_free_all(bio);
+ out=NULL;
+ }
+ return(out);
+ }
+
+static BIO *PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
+ {
+ for (;;)
+ {
+ bio=BIO_find_type(bio,BIO_TYPE_MD);
+ if (bio == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_FIND_DIGEST,PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST);
+ return NULL;
+ }
+ BIO_get_md_ctx(bio,pmd);
+ if (*pmd == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_FIND_DIGEST,ERR_R_INTERNAL_ERROR);
+ return NULL;
+ }
+ if (EVP_MD_CTX_type(*pmd) == nid)
+ return bio;
+ bio=BIO_next(bio);
+ }
+ return NULL;
+ }
+
+static int do_pkcs7_signed_attrib(PKCS7_SIGNER_INFO *si, EVP_MD_CTX *mctx)
+ {
+ unsigned char md_data[EVP_MAX_MD_SIZE];
+ unsigned int md_len;
+
+ /* Add signing time if not already present */
+ if (!PKCS7_get_signed_attribute(si, NID_pkcs9_signingTime))
+ {
+ if (!PKCS7_add0_attrib_signing_time(si, NULL))
+ {
+ PKCS7err(PKCS7_F_DO_PKCS7_SIGNED_ATTRIB,
+ ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ }
+
+ /* Add digest */
+ EVP_DigestFinal_ex(mctx, md_data,&md_len);
+ if (!PKCS7_add1_attrib_digest(si, md_data, md_len))
+ {
+ PKCS7err(PKCS7_F_DO_PKCS7_SIGNED_ATTRIB, ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+
+ /* Now sign the attributes */
+ if (!PKCS7_SIGNER_INFO_sign(si))
+ return 0;
+
+ return 1;
+ }
+
+
+int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
+ {
+ int ret=0;
+ int i,j;
+ BIO *btmp;
+ PKCS7_SIGNER_INFO *si;
+ EVP_MD_CTX *mdc,ctx_tmp;
+ STACK_OF(X509_ATTRIBUTE) *sk;
+ STACK_OF(PKCS7_SIGNER_INFO) *si_sk=NULL;
+ ASN1_OCTET_STRING *os=NULL;
+
+ EVP_MD_CTX_init(&ctx_tmp);
+ i=OBJ_obj2nid(p7->type);
+ p7->state=PKCS7_S_HEADER;
+
+ switch (i)
+ {
+ case NID_pkcs7_data:
+ os = p7->d.data;
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ /* XXXXXXXXXXXXXXXX */
+ si_sk=p7->d.signed_and_enveloped->signer_info;
+ os = p7->d.signed_and_enveloped->enc_data->enc_data;
+ if (!os)
+ {
+ os=M_ASN1_OCTET_STRING_new();
+ if (!os)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+ p7->d.signed_and_enveloped->enc_data->enc_data=os;
+ }
+ break;
+ case NID_pkcs7_enveloped:
+ /* XXXXXXXXXXXXXXXX */
+ os = p7->d.enveloped->enc_data->enc_data;
+ if (!os)
+ {
+ os=M_ASN1_OCTET_STRING_new();
+ if (!os)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+ p7->d.enveloped->enc_data->enc_data=os;
+ }
+ break;
+ case NID_pkcs7_signed:
+ si_sk=p7->d.sign->signer_info;
+ os=PKCS7_get_octet_string(p7->d.sign->contents);
+ /* If detached data then the content is excluded */
+ if(PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) {
+ M_ASN1_OCTET_STRING_free(os);
+ p7->d.sign->contents->d.data = NULL;
+ }
+ break;
+
+ case NID_pkcs7_digest:
+ os=PKCS7_get_octet_string(p7->d.digest->contents);
+ /* If detached data then the content is excluded */
+ if(PKCS7_type_is_data(p7->d.digest->contents) && p7->detached)
+ {
+ M_ASN1_OCTET_STRING_free(os);
+ p7->d.digest->contents->d.data = NULL;
+ }
+ break;
+
+ default:
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL,PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
+ goto err;
+ }
+
+ if (si_sk != NULL)
+ {
+ for (i=0; i<sk_PKCS7_SIGNER_INFO_num(si_sk); i++)
+ {
+ si=sk_PKCS7_SIGNER_INFO_value(si_sk,i);
+ if (si->pkey == NULL)
+ continue;
+
+ j = OBJ_obj2nid(si->digest_alg->algorithm);
+
+ btmp=bio;
+
+ btmp = PKCS7_find_digest(&mdc, btmp, j);
+
+ if (btmp == NULL)
+ goto err;
+
+ /* We now have the EVP_MD_CTX, lets do the
+ * signing. */
+ EVP_MD_CTX_copy_ex(&ctx_tmp,mdc);
+
+ sk=si->auth_attr;
+
+ /* If there are attributes, we add the digest
+ * attribute and only sign the attributes */
+ if (sk_X509_ATTRIBUTE_num(sk) > 0)
+ {
+ if (!do_pkcs7_signed_attrib(si, &ctx_tmp))
+ goto err;
+ }
+ else
+ {
+ unsigned char *abuf = NULL;
+ unsigned int abuflen;
+ abuflen = EVP_PKEY_size(si->pkey);
+ abuf = OPENSSL_malloc(abuflen);
+ if (!abuf)
+ goto err;
+
+ if (!EVP_SignFinal(&ctx_tmp, abuf, &abuflen,
+ si->pkey))
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL,
+ ERR_R_EVP_LIB);
+ goto err;
+ }
+ ASN1_STRING_set0(si->enc_digest, abuf, abuflen);
+ }
+ }
+ }
+ else if (i == NID_pkcs7_digest)
+ {
+ unsigned char md_data[EVP_MAX_MD_SIZE];
+ unsigned int md_len;
+ if (!PKCS7_find_digest(&mdc, bio,
+ OBJ_obj2nid(p7->d.digest->md->algorithm)))
+ goto err;
+ EVP_DigestFinal_ex(mdc,md_data,&md_len);
+ M_ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len);
+ }
+
+ if (!PKCS7_is_detached(p7) && !(os->flags & ASN1_STRING_FLAG_NDEF))
+ {
+ char *cont;
+ long contlen;
+ btmp=BIO_find_type(bio,BIO_TYPE_MEM);
+ if (btmp == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL,PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
+ goto err;
+ }
+ contlen = BIO_get_mem_data(btmp, &cont);
+ /* Mark the BIO read only then we can use its copy of the data
+ * instead of making an extra copy.
+ */
+ BIO_set_flags(btmp, BIO_FLAGS_MEM_RDONLY);
+ BIO_set_mem_eof_return(btmp, 0);
+ ASN1_STRING_set0(os, (unsigned char *)cont, contlen);
+ }
+ ret=1;
+err:
+ EVP_MD_CTX_cleanup(&ctx_tmp);
+ return(ret);
+ }
+
+int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
+ {
+ EVP_MD_CTX mctx;
+ EVP_PKEY_CTX *pctx;
+ unsigned char *abuf = NULL;
+ int alen;
+ size_t siglen;
+ const EVP_MD *md = NULL;
+
+ md = EVP_get_digestbyobj(si->digest_alg->algorithm);
+ if (md == NULL)
+ return 0;
+
+ EVP_MD_CTX_init(&mctx);
+ if (EVP_DigestSignInit(&mctx, &pctx, md,NULL, si->pkey) <= 0)
+ goto err;
+
+ if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_SIGN,
+ EVP_PKEY_CTRL_PKCS7_SIGN, 0, si) <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNER_INFO_SIGN, PKCS7_R_CTRL_ERROR);
+ goto err;
+ }
+
+ alen = ASN1_item_i2d((ASN1_VALUE *)si->auth_attr,&abuf,
+ ASN1_ITEM_rptr(PKCS7_ATTR_SIGN));
+ if(!abuf)
+ goto err;
+ if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0)
+ goto err;
+ OPENSSL_free(abuf);
+ if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
+ goto err;
+ abuf = OPENSSL_malloc(siglen);
+ if(!abuf)
+ goto err;
+ if (EVP_DigestSignFinal(&mctx, abuf, &siglen) <= 0)
+ goto err;
+
+ if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_SIGN,
+ EVP_PKEY_CTRL_PKCS7_SIGN, 1, si) <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNER_INFO_SIGN, PKCS7_R_CTRL_ERROR);
+ goto err;
+ }
+
+ EVP_MD_CTX_cleanup(&mctx);
+
+ ASN1_STRING_set0(si->enc_digest, abuf, siglen);
+
+ return 1;
+
+ err:
+ if (abuf)
+ OPENSSL_free(abuf);
+ EVP_MD_CTX_cleanup(&mctx);
+ return 0;
+
+ }
+
+int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
+ PKCS7 *p7, PKCS7_SIGNER_INFO *si)
+ {
+ PKCS7_ISSUER_AND_SERIAL *ias;
+ int ret=0,i;
+ STACK_OF(X509) *cert;
+ X509 *x509;
+
+ if (PKCS7_type_is_signed(p7))
+ {
+ cert=p7->d.sign->cert;
+ }
+ else if (PKCS7_type_is_signedAndEnveloped(p7))
+ {
+ cert=p7->d.signed_and_enveloped->cert;
+ }
+ else
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY,PKCS7_R_WRONG_PKCS7_TYPE);
+ goto err;
+ }
+ /* XXXXXXXXXXXXXXXXXXXXXXX */
+ ias=si->issuer_and_serial;
+
+ x509=X509_find_by_issuer_and_serial(cert,ias->issuer,ias->serial);
+
+ /* were we able to find the cert in passed to us */
+ if (x509 == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY,PKCS7_R_UNABLE_TO_FIND_CERTIFICATE);
+ goto err;
+ }
+
+ /* Lets verify */
+ if(!X509_STORE_CTX_init(ctx,cert_store,x509,cert))
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY,ERR_R_X509_LIB);
+ goto err;
+ }
+ X509_STORE_CTX_set_purpose(ctx, X509_PURPOSE_SMIME_SIGN);
+ i=X509_verify_cert(ctx);
+ if (i <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY,ERR_R_X509_LIB);
+ X509_STORE_CTX_cleanup(ctx);
+ goto err;
+ }
+ X509_STORE_CTX_cleanup(ctx);
+
+ return PKCS7_signatureVerify(bio, p7, si, x509);
+ err:
+ return ret;
+ }
+
+int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
+ X509 *x509)
+ {
+ ASN1_OCTET_STRING *os;
+ EVP_MD_CTX mdc_tmp,*mdc;
+ int ret=0,i;
+ int md_type;
+ STACK_OF(X509_ATTRIBUTE) *sk;
+ BIO *btmp;
+ EVP_PKEY *pkey;
+
+ EVP_MD_CTX_init(&mdc_tmp);
+
+ if (!PKCS7_type_is_signed(p7) &&
+ !PKCS7_type_is_signedAndEnveloped(p7)) {
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,
+ PKCS7_R_WRONG_PKCS7_TYPE);
+ goto err;
+ }
+
+ md_type=OBJ_obj2nid(si->digest_alg->algorithm);
+
+ btmp=bio;
+ for (;;)
+ {
+ if ((btmp == NULL) ||
+ ((btmp=BIO_find_type(btmp,BIO_TYPE_MD)) == NULL))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,
+ PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST);
+ goto err;
+ }
+ BIO_get_md_ctx(btmp,&mdc);
+ if (mdc == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,
+ ERR_R_INTERNAL_ERROR);
+ goto err;
+ }
+ if (EVP_MD_CTX_type(mdc) == md_type)
+ break;
+ /* Workaround for some broken clients that put the signature
+ * OID instead of the digest OID in digest_alg->algorithm
+ */
+ if (EVP_MD_pkey_type(EVP_MD_CTX_md(mdc)) == md_type)
+ break;
+ btmp=BIO_next(btmp);
+ }
+
+ /* mdc is the digest ctx that we want, unless there are attributes,
+ * in which case the digest is the signed attributes */
+ EVP_MD_CTX_copy_ex(&mdc_tmp,mdc);
+
+ sk=si->auth_attr;
+ if ((sk != NULL) && (sk_X509_ATTRIBUTE_num(sk) != 0))
+ {
+ unsigned char md_dat[EVP_MAX_MD_SIZE], *abuf = NULL;
+ unsigned int md_len;
+ int alen;
+ ASN1_OCTET_STRING *message_digest;
+
+ EVP_DigestFinal_ex(&mdc_tmp,md_dat,&md_len);
+ message_digest=PKCS7_digest_from_attributes(sk);
+ if (!message_digest)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,
+ PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST);
+ goto err;
+ }
+ if ((message_digest->length != (int)md_len) ||
+ (memcmp(message_digest->data,md_dat,md_len)))
+ {
+#if 0
+{
+int ii;
+for (ii=0; ii<message_digest->length; ii++)
+ printf("%02X",message_digest->data[ii]); printf(" sent\n");
+for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n");
+}
+#endif
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,
+ PKCS7_R_DIGEST_FAILURE);
+ ret= -1;
+ goto err;
+ }
+
+ EVP_VerifyInit_ex(&mdc_tmp,EVP_get_digestbynid(md_type), NULL);
+
+ alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf,
+ ASN1_ITEM_rptr(PKCS7_ATTR_VERIFY));
+ if (alen <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,ERR_R_ASN1_LIB);
+ ret = -1;
+ goto err;
+ }
+ EVP_VerifyUpdate(&mdc_tmp, abuf, alen);
+
+ OPENSSL_free(abuf);
+ }
+
+ os=si->enc_digest;
+ pkey = X509_get_pubkey(x509);
+ if (!pkey)
+ {
+ ret = -1;
+ goto err;
+ }
+
+ i=EVP_VerifyFinal(&mdc_tmp,os->data,os->length, pkey);
+ EVP_PKEY_free(pkey);
+ if (i <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY,
+ PKCS7_R_SIGNATURE_FAILURE);
+ ret= -1;
+ goto err;
+ }
+ else
+ ret=1;
+err:
+ EVP_MD_CTX_cleanup(&mdc_tmp);
+ return(ret);
+ }
+
+PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx)
+ {
+ STACK_OF(PKCS7_RECIP_INFO) *rsk;
+ PKCS7_RECIP_INFO *ri;
+ int i;
+
+ i=OBJ_obj2nid(p7->type);
+ if (i != NID_pkcs7_signedAndEnveloped)
+ return NULL;
+ if (p7->d.signed_and_enveloped == NULL)
+ return NULL;
+ rsk=p7->d.signed_and_enveloped->recipientinfo;
+ if (rsk == NULL)
+ return NULL;
+ ri=sk_PKCS7_RECIP_INFO_value(rsk,0);
+ if (sk_PKCS7_RECIP_INFO_num(rsk) <= idx) return(NULL);
+ ri=sk_PKCS7_RECIP_INFO_value(rsk,idx);
+ return(ri->issuer_and_serial);
+ }
+
+ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid)
+ {
+ return(get_attribute(si->auth_attr,nid));
+ }
+
+ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid)
+ {
+ return(get_attribute(si->unauth_attr,nid));
+ }
+
+static ASN1_TYPE *get_attribute(STACK_OF(X509_ATTRIBUTE) *sk, int nid)
+ {
+ int i;
+ X509_ATTRIBUTE *xa;
+ ASN1_OBJECT *o;
+
+ o=OBJ_nid2obj(nid);
+ if (!o || !sk) return(NULL);
+ for (i=0; i<sk_X509_ATTRIBUTE_num(sk); i++)
+ {
+ xa=sk_X509_ATTRIBUTE_value(sk,i);
+ if (OBJ_cmp(xa->object,o) == 0)
+ {
+ if (!xa->single && sk_ASN1_TYPE_num(xa->value.set))
+ return(sk_ASN1_TYPE_value(xa->value.set,0));
+ else
+ return(NULL);
+ }
+ }
+ return(NULL);
+ }
+
+ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk)
+{
+ ASN1_TYPE *astype;
+ if(!(astype = get_attribute(sk, NID_pkcs9_messageDigest))) return NULL;
+ return astype->value.octet_string;
+}
+
+int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
+ STACK_OF(X509_ATTRIBUTE) *sk)
+ {
+ int i;
+
+ if (p7si->auth_attr != NULL)
+ sk_X509_ATTRIBUTE_pop_free(p7si->auth_attr,X509_ATTRIBUTE_free);
+ p7si->auth_attr=sk_X509_ATTRIBUTE_dup(sk);
+ if (p7si->auth_attr == NULL)
+ return 0;
+ for (i=0; i<sk_X509_ATTRIBUTE_num(sk); i++)
+ {
+ if ((sk_X509_ATTRIBUTE_set(p7si->auth_attr,i,
+ X509_ATTRIBUTE_dup(sk_X509_ATTRIBUTE_value(sk,i))))
+ == NULL)
+ return(0);
+ }
+ return(1);
+ }
+
+int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE) *sk)
+ {
+ int i;
+
+ if (p7si->unauth_attr != NULL)
+ sk_X509_ATTRIBUTE_pop_free(p7si->unauth_attr,
+ X509_ATTRIBUTE_free);
+ p7si->unauth_attr=sk_X509_ATTRIBUTE_dup(sk);
+ if (p7si->unauth_attr == NULL)
+ return 0;
+ for (i=0; i<sk_X509_ATTRIBUTE_num(sk); i++)
+ {
+ if ((sk_X509_ATTRIBUTE_set(p7si->unauth_attr,i,
+ X509_ATTRIBUTE_dup(sk_X509_ATTRIBUTE_value(sk,i))))
+ == NULL)
+ return(0);
+ }
+ return(1);
+ }
+
+int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
+ void *value)
+ {
+ return(add_attribute(&(p7si->auth_attr),nid,atrtype,value));
+ }
+
+int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
+ void *value)
+ {
+ return(add_attribute(&(p7si->unauth_attr),nid,atrtype,value));
+ }
+
+static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
+ void *value)
+ {
+ X509_ATTRIBUTE *attr=NULL;
+
+ if (*sk == NULL)
+ {
+ *sk = sk_X509_ATTRIBUTE_new_null();
+ if (*sk == NULL)
+ return 0;
+new_attrib:
+ if (!(attr=X509_ATTRIBUTE_create(nid,atrtype,value)))
+ return 0;
+ if (!sk_X509_ATTRIBUTE_push(*sk,attr))
+ {
+ X509_ATTRIBUTE_free(attr);
+ return 0;
+ }
+ }
+ else
+ {
+ int i;
+
+ for (i=0; i<sk_X509_ATTRIBUTE_num(*sk); i++)
+ {
+ attr=sk_X509_ATTRIBUTE_value(*sk,i);
+ if (OBJ_obj2nid(attr->object) == nid)
+ {
+ X509_ATTRIBUTE_free(attr);
+ attr=X509_ATTRIBUTE_create(nid,atrtype,value);
+ if (attr == NULL)
+ return 0;
+ if (!sk_X509_ATTRIBUTE_set(*sk,i,attr))
+ {
+ X509_ATTRIBUTE_free(attr);
+ return 0;
+ }
+ goto end;
+ }
+ }
+ goto new_attrib;
+ }
+end:
+ return(1);
+ }
+
diff --git a/main/openssl/crypto/pkcs7/pk7_enc.c b/main/openssl/crypto/pkcs7/pk7_enc.c
new file mode 100644
index 00000000..acbb189c
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_enc.c
@@ -0,0 +1,76 @@
+/* crypto/pkcs7/pk7_enc.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/evp.h>
+#include <openssl/rand.h>
+#include <openssl/objects.h>
+#include <openssl/x509.h>
+#include <openssl/pkcs7.h>
+
+PKCS7_in_bio(PKCS7 *p7,BIO *in);
+PKCS7_out_bio(PKCS7 *p7,BIO *out);
+
+PKCS7_add_signer(PKCS7 *p7,X509 *cert,EVP_PKEY *key);
+PKCS7_cipher(PKCS7 *p7,EVP_CIPHER *cipher);
+
+PKCS7_Init(PKCS7 *p7);
+PKCS7_Update(PKCS7 *p7);
+PKCS7_Finish(PKCS7 *p7);
+
diff --git a/main/openssl/crypto/pkcs7/pk7_lib.c b/main/openssl/crypto/pkcs7/pk7_lib.c
new file mode 100644
index 00000000..d411269b
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_lib.c
@@ -0,0 +1,665 @@
+/* crypto/pkcs7/pk7_lib.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/objects.h>
+#include <openssl/x509.h>
+#include "asn1_locl.h"
+
+long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg)
+ {
+ int nid;
+ long ret;
+
+ nid=OBJ_obj2nid(p7->type);
+
+ switch (cmd)
+ {
+ case PKCS7_OP_SET_DETACHED_SIGNATURE:
+ if (nid == NID_pkcs7_signed)
+ {
+ ret=p7->detached=(int)larg;
+ if (ret && PKCS7_type_is_data(p7->d.sign->contents))
+ {
+ ASN1_OCTET_STRING *os;
+ os=p7->d.sign->contents->d.data;
+ ASN1_OCTET_STRING_free(os);
+ p7->d.sign->contents->d.data = NULL;
+ }
+ }
+ else
+ {
+ PKCS7err(PKCS7_F_PKCS7_CTRL,PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE);
+ ret=0;
+ }
+ break;
+ case PKCS7_OP_GET_DETACHED_SIGNATURE:
+ if (nid == NID_pkcs7_signed)
+ {
+ if(!p7->d.sign || !p7->d.sign->contents->d.ptr)
+ ret = 1;
+ else ret = 0;
+
+ p7->detached = ret;
+ }
+ else
+ {
+ PKCS7err(PKCS7_F_PKCS7_CTRL,PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE);
+ ret=0;
+ }
+
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_CTRL,PKCS7_R_UNKNOWN_OPERATION);
+ ret=0;
+ }
+ return(ret);
+ }
+
+int PKCS7_content_new(PKCS7 *p7, int type)
+ {
+ PKCS7 *ret=NULL;
+
+ if ((ret=PKCS7_new()) == NULL) goto err;
+ if (!PKCS7_set_type(ret,type)) goto err;
+ if (!PKCS7_set_content(p7,ret)) goto err;
+
+ return(1);
+err:
+ if (ret != NULL) PKCS7_free(ret);
+ return(0);
+ }
+
+int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data)
+ {
+ int i;
+
+ i=OBJ_obj2nid(p7->type);
+ switch (i)
+ {
+ case NID_pkcs7_signed:
+ if (p7->d.sign->contents != NULL)
+ PKCS7_free(p7->d.sign->contents);
+ p7->d.sign->contents=p7_data;
+ break;
+ case NID_pkcs7_digest:
+ if (p7->d.digest->contents != NULL)
+ PKCS7_free(p7->d.digest->contents);
+ p7->d.digest->contents=p7_data;
+ break;
+ case NID_pkcs7_data:
+ case NID_pkcs7_enveloped:
+ case NID_pkcs7_signedAndEnveloped:
+ case NID_pkcs7_encrypted:
+ default:
+ PKCS7err(PKCS7_F_PKCS7_SET_CONTENT,PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
+ goto err;
+ }
+ return(1);
+err:
+ return(0);
+ }
+
+int PKCS7_set_type(PKCS7 *p7, int type)
+ {
+ ASN1_OBJECT *obj;
+
+ /*PKCS7_content_free(p7);*/
+ obj=OBJ_nid2obj(type); /* will not fail */
+
+ switch (type)
+ {
+ case NID_pkcs7_signed:
+ p7->type=obj;
+ if ((p7->d.sign=PKCS7_SIGNED_new()) == NULL)
+ goto err;
+ if (!ASN1_INTEGER_set(p7->d.sign->version,1))
+ {
+ PKCS7_SIGNED_free(p7->d.sign);
+ p7->d.sign=NULL;
+ goto err;
+ }
+ break;
+ case NID_pkcs7_data:
+ p7->type=obj;
+ if ((p7->d.data=M_ASN1_OCTET_STRING_new()) == NULL)
+ goto err;
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ p7->type=obj;
+ if ((p7->d.signed_and_enveloped=PKCS7_SIGN_ENVELOPE_new())
+ == NULL) goto err;
+ ASN1_INTEGER_set(p7->d.signed_and_enveloped->version,1);
+ if (!ASN1_INTEGER_set(p7->d.signed_and_enveloped->version,1))
+ goto err;
+ p7->d.signed_and_enveloped->enc_data->content_type
+ = OBJ_nid2obj(NID_pkcs7_data);
+ break;
+ case NID_pkcs7_enveloped:
+ p7->type=obj;
+ if ((p7->d.enveloped=PKCS7_ENVELOPE_new())
+ == NULL) goto err;
+ if (!ASN1_INTEGER_set(p7->d.enveloped->version,0))
+ goto err;
+ p7->d.enveloped->enc_data->content_type
+ = OBJ_nid2obj(NID_pkcs7_data);
+ break;
+ case NID_pkcs7_encrypted:
+ p7->type=obj;
+ if ((p7->d.encrypted=PKCS7_ENCRYPT_new())
+ == NULL) goto err;
+ if (!ASN1_INTEGER_set(p7->d.encrypted->version,0))
+ goto err;
+ p7->d.encrypted->enc_data->content_type
+ = OBJ_nid2obj(NID_pkcs7_data);
+ break;
+
+ case NID_pkcs7_digest:
+ p7->type=obj;
+ if ((p7->d.digest=PKCS7_DIGEST_new())
+ == NULL) goto err;
+ if (!ASN1_INTEGER_set(p7->d.digest->version,0))
+ goto err;
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_SET_TYPE,PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
+ goto err;
+ }
+ return(1);
+err:
+ return(0);
+ }
+
+int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other)
+ {
+ p7->type = OBJ_nid2obj(type);
+ p7->d.other = other;
+ return 1;
+ }
+
+int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *psi)
+ {
+ int i,j,nid;
+ X509_ALGOR *alg;
+ STACK_OF(PKCS7_SIGNER_INFO) *signer_sk;
+ STACK_OF(X509_ALGOR) *md_sk;
+
+ i=OBJ_obj2nid(p7->type);
+ switch (i)
+ {
+ case NID_pkcs7_signed:
+ signer_sk= p7->d.sign->signer_info;
+ md_sk= p7->d.sign->md_algs;
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ signer_sk= p7->d.signed_and_enveloped->signer_info;
+ md_sk= p7->d.signed_and_enveloped->md_algs;
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_ADD_SIGNER,PKCS7_R_WRONG_CONTENT_TYPE);
+ return(0);
+ }
+
+ nid=OBJ_obj2nid(psi->digest_alg->algorithm);
+
+ /* If the digest is not currently listed, add it */
+ j=0;
+ for (i=0; i<sk_X509_ALGOR_num(md_sk); i++)
+ {
+ alg=sk_X509_ALGOR_value(md_sk,i);
+ if (OBJ_obj2nid(alg->algorithm) == nid)
+ {
+ j=1;
+ break;
+ }
+ }
+ if (!j) /* we need to add another algorithm */
+ {
+ if(!(alg=X509_ALGOR_new())
+ || !(alg->parameter = ASN1_TYPE_new()))
+ {
+ X509_ALGOR_free(alg);
+ PKCS7err(PKCS7_F_PKCS7_ADD_SIGNER,ERR_R_MALLOC_FAILURE);
+ return(0);
+ }
+ alg->algorithm=OBJ_nid2obj(nid);
+ alg->parameter->type = V_ASN1_NULL;
+ if (!sk_X509_ALGOR_push(md_sk,alg))
+ {
+ X509_ALGOR_free(alg);
+ return 0;
+ }
+ }
+
+ if (!sk_PKCS7_SIGNER_INFO_push(signer_sk,psi))
+ return 0;
+ return(1);
+ }
+
+int PKCS7_add_certificate(PKCS7 *p7, X509 *x509)
+ {
+ int i;
+ STACK_OF(X509) **sk;
+
+ i=OBJ_obj2nid(p7->type);
+ switch (i)
+ {
+ case NID_pkcs7_signed:
+ sk= &(p7->d.sign->cert);
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ sk= &(p7->d.signed_and_enveloped->cert);
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_ADD_CERTIFICATE,PKCS7_R_WRONG_CONTENT_TYPE);
+ return(0);
+ }
+
+ if (*sk == NULL)
+ *sk=sk_X509_new_null();
+ if (*sk == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_ADD_CERTIFICATE, ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ CRYPTO_add(&x509->references,1,CRYPTO_LOCK_X509);
+ if (!sk_X509_push(*sk,x509))
+ {
+ X509_free(x509);
+ return 0;
+ }
+ return(1);
+ }
+
+int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl)
+ {
+ int i;
+ STACK_OF(X509_CRL) **sk;
+
+ i=OBJ_obj2nid(p7->type);
+ switch (i)
+ {
+ case NID_pkcs7_signed:
+ sk= &(p7->d.sign->crl);
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+ sk= &(p7->d.signed_and_enveloped->crl);
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_ADD_CRL,PKCS7_R_WRONG_CONTENT_TYPE);
+ return(0);
+ }
+
+ if (*sk == NULL)
+ *sk=sk_X509_CRL_new_null();
+ if (*sk == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_ADD_CRL,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+
+ CRYPTO_add(&crl->references,1,CRYPTO_LOCK_X509_CRL);
+ if (!sk_X509_CRL_push(*sk,crl))
+ {
+ X509_CRL_free(crl);
+ return 0;
+ }
+ return(1);
+ }
+
+int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
+ const EVP_MD *dgst)
+ {
+ int ret;
+
+ /* We now need to add another PKCS7_SIGNER_INFO entry */
+ if (!ASN1_INTEGER_set(p7i->version,1))
+ goto err;
+ if (!X509_NAME_set(&p7i->issuer_and_serial->issuer,
+ X509_get_issuer_name(x509)))
+ goto err;
+
+ /* because ASN1_INTEGER_set is used to set a 'long' we will do
+ * things the ugly way. */
+ M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
+ if (!(p7i->issuer_and_serial->serial=
+ M_ASN1_INTEGER_dup(X509_get_serialNumber(x509))))
+ goto err;
+
+ /* lets keep the pkey around for a while */
+ CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
+ p7i->pkey=pkey;
+
+ /* Set the algorithms */
+
+ X509_ALGOR_set0(p7i->digest_alg, OBJ_nid2obj(EVP_MD_type(dgst)),
+ V_ASN1_NULL, NULL);
+
+ if (pkey->ameth && pkey->ameth->pkey_ctrl)
+ {
+ ret = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_PKCS7_SIGN,
+ 0, p7i);
+ if (ret > 0)
+ return 1;
+ if (ret != -2)
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGNER_INFO_SET,
+ PKCS7_R_SIGNING_CTRL_FAILURE);
+ return 0;
+ }
+ }
+ PKCS7err(PKCS7_F_PKCS7_SIGNER_INFO_SET,
+ PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE);
+err:
+ return 0;
+ }
+
+PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509, EVP_PKEY *pkey,
+ const EVP_MD *dgst)
+ {
+ PKCS7_SIGNER_INFO *si = NULL;
+
+ if (dgst == NULL)
+ {
+ int def_nid;
+ if (EVP_PKEY_get_default_digest_nid(pkey, &def_nid) <= 0)
+ goto err;
+ dgst = EVP_get_digestbynid(def_nid);
+ if (dgst == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_ADD_SIGNATURE,
+ PKCS7_R_NO_DEFAULT_DIGEST);
+ goto err;
+ }
+ }
+
+ if ((si=PKCS7_SIGNER_INFO_new()) == NULL) goto err;
+ if (!PKCS7_SIGNER_INFO_set(si,x509,pkey,dgst)) goto err;
+ if (!PKCS7_add_signer(p7,si)) goto err;
+ return(si);
+err:
+ if (si)
+ PKCS7_SIGNER_INFO_free(si);
+ return(NULL);
+ }
+
+int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md)
+ {
+ if (PKCS7_type_is_digest(p7))
+ {
+ if(!(p7->d.digest->md->parameter = ASN1_TYPE_new()))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SET_DIGEST,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ p7->d.digest->md->parameter->type = V_ASN1_NULL;
+ p7->d.digest->md->algorithm = OBJ_nid2obj(EVP_MD_nid(md));
+ return 1;
+ }
+
+ PKCS7err(PKCS7_F_PKCS7_SET_DIGEST,PKCS7_R_WRONG_CONTENT_TYPE);
+ return 1;
+ }
+
+STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7)
+ {
+ if (PKCS7_type_is_signed(p7))
+ {
+ return(p7->d.sign->signer_info);
+ }
+ else if (PKCS7_type_is_signedAndEnveloped(p7))
+ {
+ return(p7->d.signed_and_enveloped->signer_info);
+ }
+ else
+ return(NULL);
+ }
+
+void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
+ X509_ALGOR **pdig, X509_ALGOR **psig)
+ {
+ if (pk)
+ *pk = si->pkey;
+ if (pdig)
+ *pdig = si->digest_alg;
+ if (psig)
+ *psig = si->digest_enc_alg;
+ }
+
+void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc)
+ {
+ if (penc)
+ *penc = ri->key_enc_algor;
+ }
+
+PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509)
+ {
+ PKCS7_RECIP_INFO *ri;
+
+ if ((ri=PKCS7_RECIP_INFO_new()) == NULL) goto err;
+ if (!PKCS7_RECIP_INFO_set(ri,x509)) goto err;
+ if (!PKCS7_add_recipient_info(p7,ri)) goto err;
+ return ri;
+err:
+ if (ri)
+ PKCS7_RECIP_INFO_free(ri);
+ return NULL;
+ }
+
+int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri)
+ {
+ int i;
+ STACK_OF(PKCS7_RECIP_INFO) *sk;
+
+ i=OBJ_obj2nid(p7->type);
+ switch (i)
+ {
+ case NID_pkcs7_signedAndEnveloped:
+ sk= p7->d.signed_and_enveloped->recipientinfo;
+ break;
+ case NID_pkcs7_enveloped:
+ sk= p7->d.enveloped->recipientinfo;
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_ADD_RECIPIENT_INFO,PKCS7_R_WRONG_CONTENT_TYPE);
+ return(0);
+ }
+
+ if (!sk_PKCS7_RECIP_INFO_push(sk,ri))
+ return 0;
+ return(1);
+ }
+
+int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509)
+ {
+ int ret;
+ EVP_PKEY *pkey = NULL;
+ if (!ASN1_INTEGER_set(p7i->version,0))
+ return 0;
+ if (!X509_NAME_set(&p7i->issuer_and_serial->issuer,
+ X509_get_issuer_name(x509)))
+ return 0;
+
+ M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
+ if (!(p7i->issuer_and_serial->serial=
+ M_ASN1_INTEGER_dup(X509_get_serialNumber(x509))))
+ return 0;
+
+ pkey = X509_get_pubkey(x509);
+
+ if (!pkey || !pkey->ameth || !pkey->ameth->pkey_ctrl)
+ {
+ PKCS7err(PKCS7_F_PKCS7_RECIP_INFO_SET,
+ PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE);
+ goto err;
+ }
+
+ ret = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_PKCS7_ENCRYPT,
+ 0, p7i);
+ if (ret == -2)
+ {
+ PKCS7err(PKCS7_F_PKCS7_RECIP_INFO_SET,
+ PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE);
+ goto err;
+ }
+ if (ret <= 0)
+ {
+ PKCS7err(PKCS7_F_PKCS7_RECIP_INFO_SET,
+ PKCS7_R_ENCRYPTION_CTRL_FAILURE);
+ goto err;
+ }
+
+ EVP_PKEY_free(pkey);
+
+ CRYPTO_add(&x509->references,1,CRYPTO_LOCK_X509);
+ p7i->cert=x509;
+
+ return 1;
+
+ err:
+ if (pkey)
+ EVP_PKEY_free(pkey);
+ return 0;
+ }
+
+X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si)
+ {
+ if (PKCS7_type_is_signed(p7))
+ return(X509_find_by_issuer_and_serial(p7->d.sign->cert,
+ si->issuer_and_serial->issuer,
+ si->issuer_and_serial->serial));
+ else
+ return(NULL);
+ }
+
+int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher)
+ {
+ int i;
+ PKCS7_ENC_CONTENT *ec;
+
+ i=OBJ_obj2nid(p7->type);
+ switch (i)
+ {
+ case NID_pkcs7_signedAndEnveloped:
+ ec=p7->d.signed_and_enveloped->enc_data;
+ break;
+ case NID_pkcs7_enveloped:
+ ec=p7->d.enveloped->enc_data;
+ break;
+ default:
+ PKCS7err(PKCS7_F_PKCS7_SET_CIPHER,PKCS7_R_WRONG_CONTENT_TYPE);
+ return(0);
+ }
+
+ /* Check cipher OID exists and has data in it*/
+ i = EVP_CIPHER_type(cipher);
+ if(i == NID_undef) {
+ PKCS7err(PKCS7_F_PKCS7_SET_CIPHER,PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER);
+ return(0);
+ }
+
+ ec->cipher = cipher;
+ return 1;
+ }
+
+int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
+ {
+ ASN1_OCTET_STRING *os = NULL;
+
+ switch (OBJ_obj2nid(p7->type))
+ {
+ case NID_pkcs7_data:
+ os = p7->d.data;
+ break;
+
+ case NID_pkcs7_signedAndEnveloped:
+ os = p7->d.signed_and_enveloped->enc_data->enc_data;
+ if (os == NULL)
+ {
+ os=M_ASN1_OCTET_STRING_new();
+ p7->d.signed_and_enveloped->enc_data->enc_data=os;
+ }
+ break;
+
+ case NID_pkcs7_enveloped:
+ os = p7->d.enveloped->enc_data->enc_data;
+ if (os == NULL)
+ {
+ os=M_ASN1_OCTET_STRING_new();
+ p7->d.enveloped->enc_data->enc_data=os;
+ }
+ break;
+
+ case NID_pkcs7_signed:
+ os=p7->d.sign->contents->d.data;
+ break;
+
+ default:
+ os = NULL;
+ break;
+ }
+
+ if (os == NULL)
+ return 0;
+
+ os->flags |= ASN1_STRING_FLAG_NDEF;
+ *boundary = &os->data;
+
+ return 1;
+ }
diff --git a/main/openssl/crypto/pkcs7/pk7_mime.c b/main/openssl/crypto/pkcs7/pk7_mime.c
new file mode 100644
index 00000000..938f79a6
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_mime.c
@@ -0,0 +1,97 @@
+/* pk7_mime.c */
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ * project.
+ */
+/* ====================================================================
+ * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * licensing@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ */
+
+#include <stdio.h>
+#include <ctype.h>
+#include "cryptlib.h"
+#include <openssl/rand.h>
+#include <openssl/x509.h>
+#include <openssl/asn1.h>
+
+/* PKCS#7 wrappers round generalised stream and MIME routines */
+
+int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
+ {
+ return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags,
+ ASN1_ITEM_rptr(PKCS7));
+ }
+
+int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
+ {
+ return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *) p7, in, flags,
+ "PKCS7",
+ ASN1_ITEM_rptr(PKCS7));
+ }
+
+int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
+ {
+ STACK_OF(X509_ALGOR) *mdalgs;
+ int ctype_nid = OBJ_obj2nid(p7->type);
+ if (ctype_nid == NID_pkcs7_signed)
+ mdalgs = p7->d.sign->md_algs;
+ else
+ mdalgs = NULL;
+
+ flags ^= SMIME_OLDMIME;
+
+
+ return SMIME_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags,
+ ctype_nid, NID_undef, mdalgs,
+ ASN1_ITEM_rptr(PKCS7));
+ }
+
+PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont)
+ {
+ return (PKCS7 *)SMIME_read_ASN1(bio, bcont, ASN1_ITEM_rptr(PKCS7));
+ }
diff --git a/main/openssl/crypto/pkcs7/pk7_smime.c b/main/openssl/crypto/pkcs7/pk7_smime.c
new file mode 100644
index 00000000..86742d0d
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pk7_smime.c
@@ -0,0 +1,587 @@
+/* pk7_smime.c */
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ * project.
+ */
+/* ====================================================================
+ * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * licensing@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+/* Simple PKCS#7 processing functions */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+
+static int pkcs7_copy_existing_digest(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
+
+PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
+ BIO *data, int flags)
+{
+ PKCS7 *p7;
+ int i;
+
+ if(!(p7 = PKCS7_new()))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE);
+ return NULL;
+ }
+
+ if (!PKCS7_set_type(p7, NID_pkcs7_signed))
+ goto err;
+
+ if (!PKCS7_content_new(p7, NID_pkcs7_data))
+ goto err;
+
+ if (pkey && !PKCS7_sign_add_signer(p7, signcert, pkey, NULL, flags))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGN,PKCS7_R_PKCS7_ADD_SIGNER_ERROR);
+ goto err;
+ }
+
+ if(!(flags & PKCS7_NOCERTS))
+ {
+ for(i = 0; i < sk_X509_num(certs); i++)
+ {
+ if (!PKCS7_add_certificate(p7, sk_X509_value(certs, i)))
+ goto err;
+ }
+ }
+
+ if(flags & PKCS7_DETACHED)
+ PKCS7_set_detached(p7, 1);
+
+ if (flags & (PKCS7_STREAM|PKCS7_PARTIAL))
+ return p7;
+
+ if (PKCS7_final(p7, data, flags))
+ return p7;
+
+ err:
+ PKCS7_free(p7);
+ return NULL;
+}
+
+int PKCS7_final(PKCS7 *p7, BIO *data, int flags)
+ {
+ BIO *p7bio;
+ int ret = 0;
+ if (!(p7bio = PKCS7_dataInit(p7, NULL)))
+ {
+ PKCS7err(PKCS7_F_PKCS7_FINAL,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+
+ SMIME_crlf_copy(data, p7bio, flags);
+
+ (void)BIO_flush(p7bio);
+
+
+ if (!PKCS7_dataFinal(p7,p7bio))
+ {
+ PKCS7err(PKCS7_F_PKCS7_FINAL,PKCS7_R_PKCS7_DATASIGN);
+ goto err;
+ }
+
+ ret = 1;
+
+ err:
+ BIO_free_all(p7bio);
+
+ return ret;
+
+ }
+
+/* Check to see if a cipher exists and if so add S/MIME capabilities */
+
+static int add_cipher_smcap(STACK_OF(X509_ALGOR) *sk, int nid, int arg)
+ {
+ if (EVP_get_cipherbynid(nid))
+ return PKCS7_simple_smimecap(sk, nid, arg);
+ return 1;
+ }
+
+static int add_digest_smcap(STACK_OF(X509_ALGOR) *sk, int nid, int arg)
+ {
+ if (EVP_get_digestbynid(nid))
+ return PKCS7_simple_smimecap(sk, nid, arg);
+ return 1;
+ }
+
+PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert,
+ EVP_PKEY *pkey, const EVP_MD *md,
+ int flags)
+ {
+ PKCS7_SIGNER_INFO *si = NULL;
+ STACK_OF(X509_ALGOR) *smcap = NULL;
+ if(!X509_check_private_key(signcert, pkey))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGN_ADD_SIGNER,
+ PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE);
+ return NULL;
+ }
+
+ if (!(si = PKCS7_add_signature(p7,signcert,pkey, md)))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGN_ADD_SIGNER,
+ PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR);
+ return NULL;
+ }
+
+ if(!(flags & PKCS7_NOCERTS))
+ {
+ if (!PKCS7_add_certificate(p7, signcert))
+ goto err;
+ }
+
+ if(!(flags & PKCS7_NOATTR))
+ {
+ if (!PKCS7_add_attrib_content_type(si, NULL))
+ goto err;
+ /* Add SMIMECapabilities */
+ if(!(flags & PKCS7_NOSMIMECAP))
+ {
+ if(!(smcap = sk_X509_ALGOR_new_null()))
+ {
+ PKCS7err(PKCS7_F_PKCS7_SIGN_ADD_SIGNER,
+ ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+ if (!add_cipher_smcap(smcap, NID_aes_256_cbc, -1)
+ || !add_digest_smcap(smcap, NID_id_GostR3411_94, -1)
+ || !add_cipher_smcap(smcap, NID_id_Gost28147_89, -1)
+ || !add_cipher_smcap(smcap, NID_aes_192_cbc, -1)
+ || !add_cipher_smcap(smcap, NID_aes_128_cbc, -1)
+ || !add_cipher_smcap(smcap, NID_des_ede3_cbc, -1)
+ || !add_cipher_smcap(smcap, NID_rc2_cbc, 128)
+ || !add_cipher_smcap(smcap, NID_rc2_cbc, 64)
+ || !add_cipher_smcap(smcap, NID_des_cbc, -1)
+ || !add_cipher_smcap(smcap, NID_rc2_cbc, 40)
+ || !PKCS7_add_attrib_smimecap (si, smcap))
+ goto err;
+ sk_X509_ALGOR_pop_free(smcap, X509_ALGOR_free);
+ smcap = NULL;
+ }
+ if (flags & PKCS7_REUSE_DIGEST)
+ {
+ if (!pkcs7_copy_existing_digest(p7, si))
+ goto err;
+ if (!(flags & PKCS7_PARTIAL) &&
+ !PKCS7_SIGNER_INFO_sign(si))
+ goto err;
+ }
+ }
+ return si;
+ err:
+ if (smcap)
+ sk_X509_ALGOR_pop_free(smcap, X509_ALGOR_free);
+ return NULL;
+ }
+
+/* Search for a digest matching SignerInfo digest type and if found
+ * copy across.
+ */
+
+static int pkcs7_copy_existing_digest(PKCS7 *p7, PKCS7_SIGNER_INFO *si)
+ {
+ int i;
+ STACK_OF(PKCS7_SIGNER_INFO) *sinfos;
+ PKCS7_SIGNER_INFO *sitmp;
+ ASN1_OCTET_STRING *osdig = NULL;
+ sinfos = PKCS7_get_signer_info(p7);
+ for (i = 0; i < sk_PKCS7_SIGNER_INFO_num(sinfos); i++)
+ {
+ sitmp = sk_PKCS7_SIGNER_INFO_value(sinfos, i);
+ if (si == sitmp)
+ break;
+ if (sk_X509_ATTRIBUTE_num(sitmp->auth_attr) <= 0)
+ continue;
+ if (!OBJ_cmp(si->digest_alg->algorithm,
+ sitmp->digest_alg->algorithm))
+ {
+ osdig = PKCS7_digest_from_attributes(sitmp->auth_attr);
+ break;
+ }
+
+ }
+
+ if (osdig)
+ return PKCS7_add1_attrib_digest(si, osdig->data, osdig->length);
+
+ PKCS7err(PKCS7_F_PKCS7_COPY_EXISTING_DIGEST,
+ PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND);
+ return 0;
+ }
+
+int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
+ BIO *indata, BIO *out, int flags)
+{
+ STACK_OF(X509) *signers;
+ X509 *signer;
+ STACK_OF(PKCS7_SIGNER_INFO) *sinfos;
+ PKCS7_SIGNER_INFO *si;
+ X509_STORE_CTX cert_ctx;
+ char buf[4096];
+ int i, j=0, k, ret = 0;
+ BIO *p7bio;
+ BIO *tmpin, *tmpout;
+
+ if(!p7) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_INVALID_NULL_POINTER);
+ return 0;
+ }
+
+ if(!PKCS7_type_is_signed(p7)) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_WRONG_CONTENT_TYPE);
+ return 0;
+ }
+
+ /* Check for no data and no content: no data to verify signature */
+ if(PKCS7_get_detached(p7) && !indata) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_NO_CONTENT);
+ return 0;
+ }
+#if 0
+ /* NB: this test commented out because some versions of Netscape
+ * illegally include zero length content when signing data.
+ */
+
+ /* Check for data and content: two sets of data */
+ if(!PKCS7_get_detached(p7) && indata) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_CONTENT_AND_DATA_PRESENT);
+ return 0;
+ }
+#endif
+
+ sinfos = PKCS7_get_signer_info(p7);
+
+ if(!sinfos || !sk_PKCS7_SIGNER_INFO_num(sinfos)) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_NO_SIGNATURES_ON_DATA);
+ return 0;
+ }
+
+
+ signers = PKCS7_get0_signers(p7, certs, flags);
+
+ if(!signers) return 0;
+
+ /* Now verify the certificates */
+
+ if (!(flags & PKCS7_NOVERIFY)) for (k = 0; k < sk_X509_num(signers); k++) {
+ signer = sk_X509_value (signers, k);
+ if (!(flags & PKCS7_NOCHAIN)) {
+ if(!X509_STORE_CTX_init(&cert_ctx, store, signer,
+ p7->d.sign->cert))
+ {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_X509_LIB);
+ sk_X509_free(signers);
+ return 0;
+ }
+ X509_STORE_CTX_set_default(&cert_ctx, "smime_sign");
+ } else if(!X509_STORE_CTX_init (&cert_ctx, store, signer, NULL)) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_X509_LIB);
+ sk_X509_free(signers);
+ return 0;
+ }
+ if (!(flags & PKCS7_NOCRL))
+ X509_STORE_CTX_set0_crls(&cert_ctx, p7->d.sign->crl);
+ i = X509_verify_cert(&cert_ctx);
+ if (i <= 0) j = X509_STORE_CTX_get_error(&cert_ctx);
+ X509_STORE_CTX_cleanup(&cert_ctx);
+ if (i <= 0) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_CERTIFICATE_VERIFY_ERROR);
+ ERR_add_error_data(2, "Verify error:",
+ X509_verify_cert_error_string(j));
+ sk_X509_free(signers);
+ return 0;
+ }
+ /* Check for revocation status here */
+ }
+
+ /* Performance optimization: if the content is a memory BIO then
+ * store its contents in a temporary read only memory BIO. This
+ * avoids potentially large numbers of slow copies of data which will
+ * occur when reading from a read write memory BIO when signatures
+ * are calculated.
+ */
+
+ if (indata && (BIO_method_type(indata) == BIO_TYPE_MEM))
+ {
+ char *ptr;
+ long len;
+ len = BIO_get_mem_data(indata, &ptr);
+ tmpin = BIO_new_mem_buf(ptr, len);
+ if (tmpin == NULL)
+ {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ }
+ else
+ tmpin = indata;
+
+
+ if (!(p7bio=PKCS7_dataInit(p7,tmpin)))
+ goto err;
+
+ if(flags & PKCS7_TEXT) {
+ if(!(tmpout = BIO_new(BIO_s_mem()))) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+ BIO_set_mem_eof_return(tmpout, 0);
+ } else tmpout = out;
+
+ /* We now have to 'read' from p7bio to calculate digests etc. */
+ for (;;)
+ {
+ i=BIO_read(p7bio,buf,sizeof(buf));
+ if (i <= 0) break;
+ if (tmpout) BIO_write(tmpout, buf, i);
+ }
+
+ if(flags & PKCS7_TEXT) {
+ if(!SMIME_text(tmpout, out)) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_SMIME_TEXT_ERROR);
+ BIO_free(tmpout);
+ goto err;
+ }
+ BIO_free(tmpout);
+ }
+
+ /* Now Verify All Signatures */
+ if (!(flags & PKCS7_NOSIGS))
+ for (i=0; i<sk_PKCS7_SIGNER_INFO_num(sinfos); i++)
+ {
+ si=sk_PKCS7_SIGNER_INFO_value(sinfos,i);
+ signer = sk_X509_value (signers, i);
+ j=PKCS7_signatureVerify(p7bio,p7,si, signer);
+ if (j <= 0) {
+ PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_SIGNATURE_FAILURE);
+ goto err;
+ }
+ }
+
+ ret = 1;
+
+ err:
+
+ if (tmpin == indata)
+ {
+ if (indata) BIO_pop(p7bio);
+ }
+ BIO_free_all(p7bio);
+
+ sk_X509_free(signers);
+
+ return ret;
+}
+
+STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
+{
+ STACK_OF(X509) *signers;
+ STACK_OF(PKCS7_SIGNER_INFO) *sinfos;
+ PKCS7_SIGNER_INFO *si;
+ PKCS7_ISSUER_AND_SERIAL *ias;
+ X509 *signer;
+ int i;
+
+ if(!p7) {
+ PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_INVALID_NULL_POINTER);
+ return NULL;
+ }
+
+ if(!PKCS7_type_is_signed(p7)) {
+ PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE);
+ return NULL;
+ }
+
+ /* Collect all the signers together */
+
+ sinfos = PKCS7_get_signer_info(p7);
+
+ if(sk_PKCS7_SIGNER_INFO_num(sinfos) <= 0) {
+ PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_NO_SIGNERS);
+ return 0;
+ }
+
+ if(!(signers = sk_X509_new_null())) {
+ PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE);
+ return NULL;
+ }
+
+ for (i = 0; i < sk_PKCS7_SIGNER_INFO_num(sinfos); i++)
+ {
+ si = sk_PKCS7_SIGNER_INFO_value(sinfos, i);
+ ias = si->issuer_and_serial;
+ signer = NULL;
+ /* If any certificates passed they take priority */
+ if (certs) signer = X509_find_by_issuer_and_serial (certs,
+ ias->issuer, ias->serial);
+ if (!signer && !(flags & PKCS7_NOINTERN)
+ && p7->d.sign->cert) signer =
+ X509_find_by_issuer_and_serial (p7->d.sign->cert,
+ ias->issuer, ias->serial);
+ if (!signer) {
+ PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND);
+ sk_X509_free(signers);
+ return 0;
+ }
+
+ if (!sk_X509_push(signers, signer)) {
+ sk_X509_free(signers);
+ return NULL;
+ }
+ }
+ return signers;
+}
+
+
+/* Build a complete PKCS#7 enveloped data */
+
+PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
+ int flags)
+{
+ PKCS7 *p7;
+ BIO *p7bio = NULL;
+ int i;
+ X509 *x509;
+ if(!(p7 = PKCS7_new())) {
+ PKCS7err(PKCS7_F_PKCS7_ENCRYPT,ERR_R_MALLOC_FAILURE);
+ return NULL;
+ }
+
+ if (!PKCS7_set_type(p7, NID_pkcs7_enveloped))
+ goto err;
+ if (!PKCS7_set_cipher(p7, cipher)) {
+ PKCS7err(PKCS7_F_PKCS7_ENCRYPT,PKCS7_R_ERROR_SETTING_CIPHER);
+ goto err;
+ }
+
+ for(i = 0; i < sk_X509_num(certs); i++) {
+ x509 = sk_X509_value(certs, i);
+ if(!PKCS7_add_recipient(p7, x509)) {
+ PKCS7err(PKCS7_F_PKCS7_ENCRYPT,
+ PKCS7_R_ERROR_ADDING_RECIPIENT);
+ goto err;
+ }
+ }
+
+ if (flags & PKCS7_STREAM)
+ return p7;
+
+ if (PKCS7_final(p7, in, flags))
+ return p7;
+
+ err:
+
+ BIO_free_all(p7bio);
+ PKCS7_free(p7);
+ return NULL;
+
+}
+
+int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
+{
+ BIO *tmpmem;
+ int ret, i;
+ char buf[4096];
+
+ if(!p7) {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT,PKCS7_R_INVALID_NULL_POINTER);
+ return 0;
+ }
+
+ if(!PKCS7_type_is_enveloped(p7)) {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT,PKCS7_R_WRONG_CONTENT_TYPE);
+ return 0;
+ }
+
+ if(cert && !X509_check_private_key(cert, pkey)) {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT,
+ PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE);
+ return 0;
+ }
+
+ if(!(tmpmem = PKCS7_dataDecode(p7, pkey, NULL, cert))) {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT, PKCS7_R_DECRYPT_ERROR);
+ return 0;
+ }
+
+ if (flags & PKCS7_TEXT) {
+ BIO *tmpbuf, *bread;
+ /* Encrypt BIOs can't do BIO_gets() so add a buffer BIO */
+ if(!(tmpbuf = BIO_new(BIO_f_buffer()))) {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT, ERR_R_MALLOC_FAILURE);
+ BIO_free_all(tmpmem);
+ return 0;
+ }
+ if(!(bread = BIO_push(tmpbuf, tmpmem))) {
+ PKCS7err(PKCS7_F_PKCS7_DECRYPT, ERR_R_MALLOC_FAILURE);
+ BIO_free_all(tmpbuf);
+ BIO_free_all(tmpmem);
+ return 0;
+ }
+ ret = SMIME_text(bread, data);
+ BIO_free_all(bread);
+ return ret;
+ } else {
+ for(;;) {
+ i = BIO_read(tmpmem, buf, sizeof(buf));
+ if(i <= 0) break;
+ BIO_write(data, buf, i);
+ }
+ BIO_free_all(tmpmem);
+ return 1;
+ }
+}
diff --git a/main/openssl/crypto/pkcs7/pkcs7.h b/main/openssl/crypto/pkcs7/pkcs7.h
new file mode 100644
index 00000000..e4d44319
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pkcs7.h
@@ -0,0 +1,499 @@
+/* crypto/pkcs7/pkcs7.h */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#ifndef HEADER_PKCS7_H
+#define HEADER_PKCS7_H
+
+#include <openssl/asn1.h>
+#include <openssl/bio.h>
+#include <openssl/e_os2.h>
+
+#include <openssl/symhacks.h>
+#include <openssl/ossl_typ.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef OPENSSL_SYS_WIN32
+/* Under Win32 thes are defined in wincrypt.h */
+#undef PKCS7_ISSUER_AND_SERIAL
+#undef PKCS7_SIGNER_INFO
+#endif
+
+/*
+Encryption_ID DES-CBC
+Digest_ID MD5
+Digest_Encryption_ID rsaEncryption
+Key_Encryption_ID rsaEncryption
+*/
+
+typedef struct pkcs7_issuer_and_serial_st
+ {
+ X509_NAME *issuer;
+ ASN1_INTEGER *serial;
+ } PKCS7_ISSUER_AND_SERIAL;
+
+typedef struct pkcs7_signer_info_st
+ {
+ ASN1_INTEGER *version; /* version 1 */
+ PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
+ X509_ALGOR *digest_alg;
+ STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */
+ X509_ALGOR *digest_enc_alg;
+ ASN1_OCTET_STRING *enc_digest;
+ STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */
+
+ /* The private key to sign with */
+ EVP_PKEY *pkey;
+ } PKCS7_SIGNER_INFO;
+
+DECLARE_STACK_OF(PKCS7_SIGNER_INFO)
+DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO)
+
+typedef struct pkcs7_recip_info_st
+ {
+ ASN1_INTEGER *version; /* version 0 */
+ PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
+ X509_ALGOR *key_enc_algor;
+ ASN1_OCTET_STRING *enc_key;
+ X509 *cert; /* get the pub-key from this */
+ } PKCS7_RECIP_INFO;
+
+DECLARE_STACK_OF(PKCS7_RECIP_INFO)
+DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO)
+
+typedef struct pkcs7_signed_st
+ {
+ ASN1_INTEGER *version; /* version 1 */
+ STACK_OF(X509_ALGOR) *md_algs; /* md used */
+ STACK_OF(X509) *cert; /* [ 0 ] */
+ STACK_OF(X509_CRL) *crl; /* [ 1 ] */
+ STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
+
+ struct pkcs7_st *contents;
+ } PKCS7_SIGNED;
+/* The above structure is very very similar to PKCS7_SIGN_ENVELOPE.
+ * How about merging the two */
+
+typedef struct pkcs7_enc_content_st
+ {
+ ASN1_OBJECT *content_type;
+ X509_ALGOR *algorithm;
+ ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
+ const EVP_CIPHER *cipher;
+ } PKCS7_ENC_CONTENT;
+
+typedef struct pkcs7_enveloped_st
+ {
+ ASN1_INTEGER *version; /* version 0 */
+ STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
+ PKCS7_ENC_CONTENT *enc_data;
+ } PKCS7_ENVELOPE;
+
+typedef struct pkcs7_signedandenveloped_st
+ {
+ ASN1_INTEGER *version; /* version 1 */
+ STACK_OF(X509_ALGOR) *md_algs; /* md used */
+ STACK_OF(X509) *cert; /* [ 0 ] */
+ STACK_OF(X509_CRL) *crl; /* [ 1 ] */
+ STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
+
+ PKCS7_ENC_CONTENT *enc_data;
+ STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
+ } PKCS7_SIGN_ENVELOPE;
+
+typedef struct pkcs7_digest_st
+ {
+ ASN1_INTEGER *version; /* version 0 */
+ X509_ALGOR *md; /* md used */
+ struct pkcs7_st *contents;
+ ASN1_OCTET_STRING *digest;
+ } PKCS7_DIGEST;
+
+typedef struct pkcs7_encrypted_st
+ {
+ ASN1_INTEGER *version; /* version 0 */
+ PKCS7_ENC_CONTENT *enc_data;
+ } PKCS7_ENCRYPT;
+
+typedef struct pkcs7_st
+ {
+ /* The following is non NULL if it contains ASN1 encoding of
+ * this structure */
+ unsigned char *asn1;
+ long length;
+
+#define PKCS7_S_HEADER 0
+#define PKCS7_S_BODY 1
+#define PKCS7_S_TAIL 2
+ int state; /* used during processing */
+
+ int detached;
+
+ ASN1_OBJECT *type;
+ /* content as defined by the type */
+ /* all encryption/message digests are applied to the 'contents',
+ * leaving out the 'type' field. */
+ union {
+ char *ptr;
+
+ /* NID_pkcs7_data */
+ ASN1_OCTET_STRING *data;
+
+ /* NID_pkcs7_signed */
+ PKCS7_SIGNED *sign;
+
+ /* NID_pkcs7_enveloped */
+ PKCS7_ENVELOPE *enveloped;
+
+ /* NID_pkcs7_signedAndEnveloped */
+ PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
+
+ /* NID_pkcs7_digest */
+ PKCS7_DIGEST *digest;
+
+ /* NID_pkcs7_encrypted */
+ PKCS7_ENCRYPT *encrypted;
+
+ /* Anything else */
+ ASN1_TYPE *other;
+ } d;
+ } PKCS7;
+
+DECLARE_STACK_OF(PKCS7)
+DECLARE_ASN1_SET_OF(PKCS7)
+DECLARE_PKCS12_STACK_OF(PKCS7)
+
+#define PKCS7_OP_SET_DETACHED_SIGNATURE 1
+#define PKCS7_OP_GET_DETACHED_SIGNATURE 2
+
+#define PKCS7_get_signed_attributes(si) ((si)->auth_attr)
+#define PKCS7_get_attributes(si) ((si)->unauth_attr)
+
+#define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
+#define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
+#define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
+#define PKCS7_type_is_signedAndEnveloped(a) \
+ (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
+#define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
+#define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
+#define PKCS7_type_is_encrypted(a) \
+ (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
+
+#define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
+
+#define PKCS7_set_detached(p,v) \
+ PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)
+#define PKCS7_get_detached(p) \
+ PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)
+
+#define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
+
+/* S/MIME related flags */
+
+#define PKCS7_TEXT 0x1
+#define PKCS7_NOCERTS 0x2
+#define PKCS7_NOSIGS 0x4
+#define PKCS7_NOCHAIN 0x8
+#define PKCS7_NOINTERN 0x10
+#define PKCS7_NOVERIFY 0x20
+#define PKCS7_DETACHED 0x40
+#define PKCS7_BINARY 0x80
+#define PKCS7_NOATTR 0x100
+#define PKCS7_NOSMIMECAP 0x200
+#define PKCS7_NOOLDMIMETYPE 0x400
+#define PKCS7_CRLFEOL 0x800
+#define PKCS7_STREAM 0x1000
+#define PKCS7_NOCRL 0x2000
+#define PKCS7_PARTIAL 0x4000
+#define PKCS7_REUSE_DIGEST 0x8000
+
+/* Flags: for compatibility with older code */
+
+#define SMIME_TEXT PKCS7_TEXT
+#define SMIME_NOCERTS PKCS7_NOCERTS
+#define SMIME_NOSIGS PKCS7_NOSIGS
+#define SMIME_NOCHAIN PKCS7_NOCHAIN
+#define SMIME_NOINTERN PKCS7_NOINTERN
+#define SMIME_NOVERIFY PKCS7_NOVERIFY
+#define SMIME_DETACHED PKCS7_DETACHED
+#define SMIME_BINARY PKCS7_BINARY
+#define SMIME_NOATTR PKCS7_NOATTR
+
+DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)
+
+int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,const EVP_MD *type,
+ unsigned char *md,unsigned int *len);
+#ifndef OPENSSL_NO_FP_API
+PKCS7 *d2i_PKCS7_fp(FILE *fp,PKCS7 **p7);
+int i2d_PKCS7_fp(FILE *fp,PKCS7 *p7);
+#endif
+PKCS7 *PKCS7_dup(PKCS7 *p7);
+PKCS7 *d2i_PKCS7_bio(BIO *bp,PKCS7 **p7);
+int i2d_PKCS7_bio(BIO *bp,PKCS7 *p7);
+int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
+int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
+
+DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)
+DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)
+DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED)
+DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)
+DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE)
+DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)
+DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST)
+DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT)
+DECLARE_ASN1_FUNCTIONS(PKCS7)
+
+DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)
+DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY)
+
+DECLARE_ASN1_NDEF_FUNCTION(PKCS7)
+DECLARE_ASN1_PRINT_FUNCTION(PKCS7)
+
+long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
+
+int PKCS7_set_type(PKCS7 *p7, int type);
+int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
+int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
+int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
+ const EVP_MD *dgst);
+int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
+int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
+int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
+int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
+int PKCS7_content_new(PKCS7 *p7, int nid);
+int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
+ BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
+int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
+ X509 *x509);
+
+BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
+int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
+BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
+
+
+PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
+ EVP_PKEY *pkey, const EVP_MD *dgst);
+X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
+int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
+STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7);
+
+PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
+void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
+ X509_ALGOR **pdig, X509_ALGOR **psig);
+void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
+int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
+int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
+int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
+int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
+
+PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
+ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk);
+int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si,int nid,int type,
+ void *data);
+int PKCS7_add_attribute (PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
+ void *value);
+ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
+ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
+int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
+ STACK_OF(X509_ATTRIBUTE) *sk);
+int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,STACK_OF(X509_ATTRIBUTE) *sk);
+
+
+PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
+ BIO *data, int flags);
+
+PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
+ X509 *signcert, EVP_PKEY *pkey, const EVP_MD *md,
+ int flags);
+
+int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
+int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
+ BIO *indata, BIO *out, int flags);
+STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
+PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
+ int flags);
+int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags);
+
+int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
+ STACK_OF(X509_ALGOR) *cap);
+STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
+int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg);
+
+int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
+int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
+int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
+ const unsigned char *md, int mdlen);
+
+int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
+PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
+
+BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
+
+
+/* BEGIN ERROR CODES */
+/* The following lines are auto generated by the script mkerr.pl. Any changes
+ * made after this point may be overwritten when the script is next run.
+ */
+void ERR_load_PKCS7_strings(void);
+
+/* Error codes for the PKCS7 functions. */
+
+/* Function codes. */
+#define PKCS7_F_B64_READ_PKCS7 120
+#define PKCS7_F_B64_WRITE_PKCS7 121
+#define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 136
+#define PKCS7_F_I2D_PKCS7_BIO_STREAM 140
+#define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 135
+#define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 118
+#define PKCS7_F_PKCS7_ADD_CERTIFICATE 100
+#define PKCS7_F_PKCS7_ADD_CRL 101
+#define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 102
+#define PKCS7_F_PKCS7_ADD_SIGNATURE 131
+#define PKCS7_F_PKCS7_ADD_SIGNER 103
+#define PKCS7_F_PKCS7_BIO_ADD_DIGEST 125
+#define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST 138
+#define PKCS7_F_PKCS7_CTRL 104
+#define PKCS7_F_PKCS7_DATADECODE 112
+#define PKCS7_F_PKCS7_DATAFINAL 128
+#define PKCS7_F_PKCS7_DATAINIT 105
+#define PKCS7_F_PKCS7_DATASIGN 106
+#define PKCS7_F_PKCS7_DATAVERIFY 107
+#define PKCS7_F_PKCS7_DECRYPT 114
+#define PKCS7_F_PKCS7_DECRYPT_RINFO 133
+#define PKCS7_F_PKCS7_ENCODE_RINFO 132
+#define PKCS7_F_PKCS7_ENCRYPT 115
+#define PKCS7_F_PKCS7_FINAL 134
+#define PKCS7_F_PKCS7_FIND_DIGEST 127
+#define PKCS7_F_PKCS7_GET0_SIGNERS 124
+#define PKCS7_F_PKCS7_RECIP_INFO_SET 130
+#define PKCS7_F_PKCS7_SET_CIPHER 108
+#define PKCS7_F_PKCS7_SET_CONTENT 109
+#define PKCS7_F_PKCS7_SET_DIGEST 126
+#define PKCS7_F_PKCS7_SET_TYPE 110
+#define PKCS7_F_PKCS7_SIGN 116
+#define PKCS7_F_PKCS7_SIGNATUREVERIFY 113
+#define PKCS7_F_PKCS7_SIGNER_INFO_SET 129
+#define PKCS7_F_PKCS7_SIGNER_INFO_SIGN 139
+#define PKCS7_F_PKCS7_SIGN_ADD_SIGNER 137
+#define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 119
+#define PKCS7_F_PKCS7_VERIFY 117
+#define PKCS7_F_SMIME_READ_PKCS7 122
+#define PKCS7_F_SMIME_TEXT 123
+
+/* Reason codes. */
+#define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117
+#define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144
+#define PKCS7_R_CIPHER_NOT_INITIALIZED 116
+#define PKCS7_R_CONTENT_AND_DATA_PRESENT 118
+#define PKCS7_R_CTRL_ERROR 152
+#define PKCS7_R_DECODE_ERROR 130
+#define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH 100
+#define PKCS7_R_DECRYPT_ERROR 119
+#define PKCS7_R_DIGEST_FAILURE 101
+#define PKCS7_R_ENCRYPTION_CTRL_FAILURE 149
+#define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150
+#define PKCS7_R_ERROR_ADDING_RECIPIENT 120
+#define PKCS7_R_ERROR_SETTING_CIPHER 121
+#define PKCS7_R_INVALID_MIME_TYPE 131
+#define PKCS7_R_INVALID_NULL_POINTER 143
+#define PKCS7_R_MIME_NO_CONTENT_TYPE 132
+#define PKCS7_R_MIME_PARSE_ERROR 133
+#define PKCS7_R_MIME_SIG_PARSE_ERROR 134
+#define PKCS7_R_MISSING_CERIPEND_INFO 103
+#define PKCS7_R_NO_CONTENT 122
+#define PKCS7_R_NO_CONTENT_TYPE 135
+#define PKCS7_R_NO_DEFAULT_DIGEST 151
+#define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 154
+#define PKCS7_R_NO_MULTIPART_BODY_FAILURE 136
+#define PKCS7_R_NO_MULTIPART_BOUNDARY 137
+#define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115
+#define PKCS7_R_NO_RECIPIENT_MATCHES_KEY 146
+#define PKCS7_R_NO_SIGNATURES_ON_DATA 123
+#define PKCS7_R_NO_SIGNERS 142
+#define PKCS7_R_NO_SIG_CONTENT_TYPE 138
+#define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104
+#define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124
+#define PKCS7_R_PKCS7_ADD_SIGNER_ERROR 153
+#define PKCS7_R_PKCS7_DATAFINAL 126
+#define PKCS7_R_PKCS7_DATAFINAL_ERROR 125
+#define PKCS7_R_PKCS7_DATASIGN 145
+#define PKCS7_R_PKCS7_PARSE_ERROR 139
+#define PKCS7_R_PKCS7_SIG_PARSE_ERROR 140
+#define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127
+#define PKCS7_R_SIGNATURE_FAILURE 105
+#define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128
+#define PKCS7_R_SIGNING_CTRL_FAILURE 147
+#define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 148
+#define PKCS7_R_SIG_INVALID_MIME_TYPE 141
+#define PKCS7_R_SMIME_TEXT_ERROR 129
+#define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106
+#define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107
+#define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108
+#define PKCS7_R_UNKNOWN_DIGEST_TYPE 109
+#define PKCS7_R_UNKNOWN_OPERATION 110
+#define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111
+#define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112
+#define PKCS7_R_WRONG_CONTENT_TYPE 113
+#define PKCS7_R_WRONG_PKCS7_TYPE 114
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/main/openssl/crypto/pkcs7/pkcs7err.c b/main/openssl/crypto/pkcs7/pkcs7err.c
new file mode 100644
index 00000000..d0af32a2
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/pkcs7err.c
@@ -0,0 +1,187 @@
+/* crypto/pkcs7/pkcs7err.c */
+/* ====================================================================
+ * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+/* NOTE: this file was auto generated by the mkerr.pl script: any changes
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
+ */
+
+#include <stdio.h>
+#include <openssl/err.h>
+#include <openssl/pkcs7.h>
+
+/* BEGIN ERROR CODES */
+#ifndef OPENSSL_NO_ERR
+
+#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PKCS7,func,0)
+#define ERR_REASON(reason) ERR_PACK(ERR_LIB_PKCS7,0,reason)
+
+static ERR_STRING_DATA PKCS7_str_functs[]=
+ {
+{ERR_FUNC(PKCS7_F_B64_READ_PKCS7), "B64_READ_PKCS7"},
+{ERR_FUNC(PKCS7_F_B64_WRITE_PKCS7), "B64_WRITE_PKCS7"},
+{ERR_FUNC(PKCS7_F_DO_PKCS7_SIGNED_ATTRIB), "DO_PKCS7_SIGNED_ATTRIB"},
+{ERR_FUNC(PKCS7_F_I2D_PKCS7_BIO_STREAM), "i2d_PKCS7_bio_stream"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME), "PKCS7_add0_attrib_signing_time"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP), "PKCS7_add_attrib_smimecap"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD_CERTIFICATE), "PKCS7_add_certificate"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD_CRL), "PKCS7_add_crl"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD_RECIPIENT_INFO), "PKCS7_add_recipient_info"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD_SIGNATURE), "PKCS7_add_signature"},
+{ERR_FUNC(PKCS7_F_PKCS7_ADD_SIGNER), "PKCS7_add_signer"},
+{ERR_FUNC(PKCS7_F_PKCS7_BIO_ADD_DIGEST), "PKCS7_BIO_ADD_DIGEST"},
+{ERR_FUNC(PKCS7_F_PKCS7_COPY_EXISTING_DIGEST), "PKCS7_COPY_EXISTING_DIGEST"},
+{ERR_FUNC(PKCS7_F_PKCS7_CTRL), "PKCS7_ctrl"},
+{ERR_FUNC(PKCS7_F_PKCS7_DATADECODE), "PKCS7_dataDecode"},
+{ERR_FUNC(PKCS7_F_PKCS7_DATAFINAL), "PKCS7_dataFinal"},
+{ERR_FUNC(PKCS7_F_PKCS7_DATAINIT), "PKCS7_dataInit"},
+{ERR_FUNC(PKCS7_F_PKCS7_DATASIGN), "PKCS7_DATASIGN"},
+{ERR_FUNC(PKCS7_F_PKCS7_DATAVERIFY), "PKCS7_dataVerify"},
+{ERR_FUNC(PKCS7_F_PKCS7_DECRYPT), "PKCS7_decrypt"},
+{ERR_FUNC(PKCS7_F_PKCS7_DECRYPT_RINFO), "PKCS7_DECRYPT_RINFO"},
+{ERR_FUNC(PKCS7_F_PKCS7_ENCODE_RINFO), "PKCS7_ENCODE_RINFO"},
+{ERR_FUNC(PKCS7_F_PKCS7_ENCRYPT), "PKCS7_encrypt"},
+{ERR_FUNC(PKCS7_F_PKCS7_FINAL), "PKCS7_final"},
+{ERR_FUNC(PKCS7_F_PKCS7_FIND_DIGEST), "PKCS7_FIND_DIGEST"},
+{ERR_FUNC(PKCS7_F_PKCS7_GET0_SIGNERS), "PKCS7_get0_signers"},
+{ERR_FUNC(PKCS7_F_PKCS7_RECIP_INFO_SET), "PKCS7_RECIP_INFO_set"},
+{ERR_FUNC(PKCS7_F_PKCS7_SET_CIPHER), "PKCS7_set_cipher"},
+{ERR_FUNC(PKCS7_F_PKCS7_SET_CONTENT), "PKCS7_set_content"},
+{ERR_FUNC(PKCS7_F_PKCS7_SET_DIGEST), "PKCS7_set_digest"},
+{ERR_FUNC(PKCS7_F_PKCS7_SET_TYPE), "PKCS7_set_type"},
+{ERR_FUNC(PKCS7_F_PKCS7_SIGN), "PKCS7_sign"},
+{ERR_FUNC(PKCS7_F_PKCS7_SIGNATUREVERIFY), "PKCS7_signatureVerify"},
+{ERR_FUNC(PKCS7_F_PKCS7_SIGNER_INFO_SET), "PKCS7_SIGNER_INFO_set"},
+{ERR_FUNC(PKCS7_F_PKCS7_SIGNER_INFO_SIGN), "PKCS7_SIGNER_INFO_sign"},
+{ERR_FUNC(PKCS7_F_PKCS7_SIGN_ADD_SIGNER), "PKCS7_sign_add_signer"},
+{ERR_FUNC(PKCS7_F_PKCS7_SIMPLE_SMIMECAP), "PKCS7_simple_smimecap"},
+{ERR_FUNC(PKCS7_F_PKCS7_VERIFY), "PKCS7_verify"},
+{ERR_FUNC(PKCS7_F_SMIME_READ_PKCS7), "SMIME_read_PKCS7"},
+{ERR_FUNC(PKCS7_F_SMIME_TEXT), "SMIME_text"},
+{0,NULL}
+ };
+
+static ERR_STRING_DATA PKCS7_str_reasons[]=
+ {
+{ERR_REASON(PKCS7_R_CERTIFICATE_VERIFY_ERROR),"certificate verify error"},
+{ERR_REASON(PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER),"cipher has no object identifier"},
+{ERR_REASON(PKCS7_R_CIPHER_NOT_INITIALIZED),"cipher not initialized"},
+{ERR_REASON(PKCS7_R_CONTENT_AND_DATA_PRESENT),"content and data present"},
+{ERR_REASON(PKCS7_R_CTRL_ERROR) ,"ctrl error"},
+{ERR_REASON(PKCS7_R_DECODE_ERROR) ,"decode error"},
+{ERR_REASON(PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH),"decrypted key is wrong length"},
+{ERR_REASON(PKCS7_R_DECRYPT_ERROR) ,"decrypt error"},
+{ERR_REASON(PKCS7_R_DIGEST_FAILURE) ,"digest failure"},
+{ERR_REASON(PKCS7_R_ENCRYPTION_CTRL_FAILURE),"encryption ctrl failure"},
+{ERR_REASON(PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE),"encryption not supported for this key type"},
+{ERR_REASON(PKCS7_R_ERROR_ADDING_RECIPIENT),"error adding recipient"},
+{ERR_REASON(PKCS7_R_ERROR_SETTING_CIPHER),"error setting cipher"},
+{ERR_REASON(PKCS7_R_INVALID_MIME_TYPE) ,"invalid mime type"},
+{ERR_REASON(PKCS7_R_INVALID_NULL_POINTER),"invalid null pointer"},
+{ERR_REASON(PKCS7_R_MIME_NO_CONTENT_TYPE),"mime no content type"},
+{ERR_REASON(PKCS7_R_MIME_PARSE_ERROR) ,"mime parse error"},
+{ERR_REASON(PKCS7_R_MIME_SIG_PARSE_ERROR),"mime sig parse error"},
+{ERR_REASON(PKCS7_R_MISSING_CERIPEND_INFO),"missing ceripend info"},
+{ERR_REASON(PKCS7_R_NO_CONTENT) ,"no content"},
+{ERR_REASON(PKCS7_R_NO_CONTENT_TYPE) ,"no content type"},
+{ERR_REASON(PKCS7_R_NO_DEFAULT_DIGEST) ,"no default digest"},
+{ERR_REASON(PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND),"no matching digest type found"},
+{ERR_REASON(PKCS7_R_NO_MULTIPART_BODY_FAILURE),"no multipart body failure"},
+{ERR_REASON(PKCS7_R_NO_MULTIPART_BOUNDARY),"no multipart boundary"},
+{ERR_REASON(PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE),"no recipient matches certificate"},
+{ERR_REASON(PKCS7_R_NO_RECIPIENT_MATCHES_KEY),"no recipient matches key"},
+{ERR_REASON(PKCS7_R_NO_SIGNATURES_ON_DATA),"no signatures on data"},
+{ERR_REASON(PKCS7_R_NO_SIGNERS) ,"no signers"},
+{ERR_REASON(PKCS7_R_NO_SIG_CONTENT_TYPE) ,"no sig content type"},
+{ERR_REASON(PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE),"operation not supported on this type"},
+{ERR_REASON(PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR),"pkcs7 add signature error"},
+{ERR_REASON(PKCS7_R_PKCS7_ADD_SIGNER_ERROR),"pkcs7 add signer error"},
+{ERR_REASON(PKCS7_R_PKCS7_DATAFINAL) ,"pkcs7 datafinal"},
+{ERR_REASON(PKCS7_R_PKCS7_DATAFINAL_ERROR),"pkcs7 datafinal error"},
+{ERR_REASON(PKCS7_R_PKCS7_DATASIGN) ,"pkcs7 datasign"},
+{ERR_REASON(PKCS7_R_PKCS7_PARSE_ERROR) ,"pkcs7 parse error"},
+{ERR_REASON(PKCS7_R_PKCS7_SIG_PARSE_ERROR),"pkcs7 sig parse error"},
+{ERR_REASON(PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),"private key does not match certificate"},
+{ERR_REASON(PKCS7_R_SIGNATURE_FAILURE) ,"signature failure"},
+{ERR_REASON(PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND),"signer certificate not found"},
+{ERR_REASON(PKCS7_R_SIGNING_CTRL_FAILURE),"signing ctrl failure"},
+{ERR_REASON(PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE),"signing not supported for this key type"},
+{ERR_REASON(PKCS7_R_SIG_INVALID_MIME_TYPE),"sig invalid mime type"},
+{ERR_REASON(PKCS7_R_SMIME_TEXT_ERROR) ,"smime text error"},
+{ERR_REASON(PKCS7_R_UNABLE_TO_FIND_CERTIFICATE),"unable to find certificate"},
+{ERR_REASON(PKCS7_R_UNABLE_TO_FIND_MEM_BIO),"unable to find mem bio"},
+{ERR_REASON(PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST),"unable to find message digest"},
+{ERR_REASON(PKCS7_R_UNKNOWN_DIGEST_TYPE) ,"unknown digest type"},
+{ERR_REASON(PKCS7_R_UNKNOWN_OPERATION) ,"unknown operation"},
+{ERR_REASON(PKCS7_R_UNSUPPORTED_CIPHER_TYPE),"unsupported cipher type"},
+{ERR_REASON(PKCS7_R_UNSUPPORTED_CONTENT_TYPE),"unsupported content type"},
+{ERR_REASON(PKCS7_R_WRONG_CONTENT_TYPE) ,"wrong content type"},
+{ERR_REASON(PKCS7_R_WRONG_PKCS7_TYPE) ,"wrong pkcs7 type"},
+{0,NULL}
+ };
+
+#endif
+
+void ERR_load_PKCS7_strings(void)
+ {
+#ifndef OPENSSL_NO_ERR
+
+ if (ERR_func_error_string(PKCS7_str_functs[0].error) == NULL)
+ {
+ ERR_load_strings(0,PKCS7_str_functs);
+ ERR_load_strings(0,PKCS7_str_reasons);
+ }
+#endif
+ }
diff --git a/main/openssl/crypto/pkcs7/server.pem b/main/openssl/crypto/pkcs7/server.pem
new file mode 100644
index 00000000..750aac20
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/server.pem
@@ -0,0 +1,24 @@
+issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
+subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (512 bit)
+-----BEGIN CERTIFICATE-----
+MIIB6TCCAVICAQAwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
+BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
+VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNOTcwNjA5MTM1NzQ2WhcNOTgwNjA5
+MTM1NzQ2WjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
+A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0IGNl
+cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8SMVIP
+Fe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8Ey2//
+Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB4TMR2CvacKE9wAsu9jyCX8YiW
+mgCM+YoP6kt4Zkj2z5IRfm7WrycKsnpnOR+tGeqAjkCeZ6/36o9l91RvPnN1VJ/i
+xQv2df0KFeMr00IkDdTNAdIWqFkSsZTAY2QAdgenb7MB1joejquYzO2DQIO7+wpH
+irObpESxAZLySCmPPg==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+MIIBPAIBAAJBAJ+zw4Qnlf8SMVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVD
+TGiXav6ooKXfX3j/7tdkuD8Ey2//Kv7+ue0CAwEAAQJAN6W31vDEP2DjdqhzCDDu
+OA4NACqoiFqyblo7yc2tM4h4xMbC3Yx5UKMN9ZkCtX0gzrz6DyF47bdKcWBzNWCj
+gQIhANEoojVt7hq+SQ6MCN6FTAysGgQf56Q3TYoJMoWvdiXVAiEAw3e3rc+VJpOz
+rHuDo6bgpjUAAXM+v3fcpsfZSNO6V7kCIQCtbVjanpUwvZkMI9by02oUk9taki3b
+PzPfAfNPYAbCJQIhAJXNQDWyqwn/lGmR11cqY2y9nZ1+5w3yHGatLrcDnQHxAiEA
+vnlEGo8K85u+KwIOimM48ZG8oTk7iFdkqLJR1utT3aU=
+-----END RSA PRIVATE KEY-----
diff --git a/main/openssl/crypto/pkcs7/sign.c b/main/openssl/crypto/pkcs7/sign.c
new file mode 100644
index 00000000..8b59885f
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/sign.c
@@ -0,0 +1,154 @@
+/* crypto/pkcs7/sign.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+#include <stdio.h>
+#include <string.h>
+#include <openssl/bio.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+
+int main(argc,argv)
+int argc;
+char *argv[];
+ {
+ X509 *x509;
+ EVP_PKEY *pkey;
+ PKCS7 *p7;
+ PKCS7_SIGNER_INFO *si;
+ BIO *in;
+ BIO *data,*p7bio;
+ char buf[1024*4];
+ int i;
+ int nodetach=0;
+
+#ifndef OPENSSL_NO_MD2
+ EVP_add_digest(EVP_md2());
+#endif
+#ifndef OPENSSL_NO_MD5
+ EVP_add_digest(EVP_md5());
+#endif
+#ifndef OPENSSL_NO_SHA1
+ EVP_add_digest(EVP_sha1());
+#endif
+#ifndef OPENSSL_NO_MDC2
+ EVP_add_digest(EVP_mdc2());
+#endif
+
+ data=BIO_new(BIO_s_file());
+again:
+ if (argc > 1)
+ {
+ if (strcmp(argv[1],"-nd") == 0)
+ {
+ nodetach=1;
+ argv++; argc--;
+ goto again;
+ }
+ if (!BIO_read_filename(data,argv[1]))
+ goto err;
+ }
+ else
+ BIO_set_fp(data,stdin,BIO_NOCLOSE);
+
+ if ((in=BIO_new_file("server.pem","r")) == NULL) goto err;
+ if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err;
+ BIO_reset(in);
+ if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL) goto err;
+ BIO_free(in);
+
+ p7=PKCS7_new();
+ PKCS7_set_type(p7,NID_pkcs7_signed);
+
+ si=PKCS7_add_signature(p7,x509,pkey,EVP_sha1());
+ if (si == NULL) goto err;
+
+ /* If you do this then you get signing time automatically added */
+ PKCS7_add_signed_attribute(si, NID_pkcs9_contentType, V_ASN1_OBJECT,
+ OBJ_nid2obj(NID_pkcs7_data));
+
+ /* we may want to add more */
+ PKCS7_add_certificate(p7,x509);
+
+ /* Set the content of the signed to 'data' */
+ PKCS7_content_new(p7,NID_pkcs7_data);
+
+ if (!nodetach)
+ PKCS7_set_detached(p7,1);
+
+ if ((p7bio=PKCS7_dataInit(p7,NULL)) == NULL) goto err;
+
+ for (;;)
+ {
+ i=BIO_read(data,buf,sizeof(buf));
+ if (i <= 0) break;
+ BIO_write(p7bio,buf,i);
+ }
+
+ if (!PKCS7_dataFinal(p7,p7bio)) goto err;
+ BIO_free(p7bio);
+
+ PEM_write_PKCS7(stdout,p7);
+ PKCS7_free(p7);
+
+ exit(0);
+err:
+ ERR_load_crypto_strings();
+ ERR_print_errors_fp(stderr);
+ exit(1);
+ }
+
diff --git a/main/openssl/crypto/pkcs7/t/3des.pem b/main/openssl/crypto/pkcs7/t/3des.pem
new file mode 100644
index 00000000..b2b5081a
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/3des.pem
@@ -0,0 +1,16 @@
+-----BEGIN PKCS7-----
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHmMIHwAgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEG
+A1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNUUkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQD
+ExJERU1PIFpFUk8gVkFMVUUgQ0ECAgR+MA0GCSqGSIb3DQEBAQUABEC2vXI1xQDW6lUHM3zQ
+/9uBEBOO5A3TtkrklAXq7v01gsIC21t52qSk36REXY+slhNZ0OQ349tgkTsoETHFLoEwMIHw
+AgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMI
+QnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29mdCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNU
+UkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQDExJERU1PIFpFUk8gVkFMVUUgQ0ECAgR9MA0G
+CSqGSIb3DQEBAQUABEB8ujxbabxXUYJhopuDm3oDq4JNqX6Io4p3ro+ShqfIndsXTZ1v5a2N
+WtLLCWlHn/habjBwZ/DgQgcKASbZ7QxNMIAGCSqGSIb3DQEHATAaBggqhkiG9w0DAjAOAgIA
+oAQIbsL5v1wX98KggAQoAaJ4WHm68fXY1WE5OIjfVBIDpO1K+i8dmKhjnAjrjoyZ9Bwc8rDL
+lgQg4CXb805h5xl+GfvSwUaHJayte1m2mcOhs3J2YyqbQ+MEIMIiJQccmhO3oDKm36CFvYR8
+5PjpclVcZyX2ngbwPFMnBAgy0clOAE6UKAAAAAAAAAAAAAA=
+-----END PKCS7-----
+
diff --git a/main/openssl/crypto/pkcs7/t/3dess.pem b/main/openssl/crypto/pkcs7/t/3dess.pem
new file mode 100644
index 00000000..23f01351
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/3dess.pem
@@ -0,0 +1,32 @@
+-----BEGIN PKCS7-----
+MIIGHgYJKoZIhvcNAQcCoIIGDzCCBgsCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
+BGswggJTMIIB/aADAgECAgIEfjANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCQVUxEzAR
+BgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNv
+ZnQgUHR5IEx0ZDEiMCAGA1UECxMZREVNT05TVFJBVElPTiBBTkQgVEVTVElORzE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1UEAxMSREVNTyBaRVJPIFZBTFVFIENBMFwwDQYJKoZIhvcNAQEB
+BQADSwAwSAJBAL+0E2fLej3FSCwe2A2iRnMuC3z12qHIp6Ky1wo2zZcxft7AI+RfkrWrSGtf
+mfzBEuPrLdfulncC5Y1pNcM8RTUCAwEAATANBgkqhkiG9w0BAQQFAANBAGSbLMphL6F5pp3s
+8o0Xyh86FHFdpVOwYx09ELLkuG17V/P9pgIc0Eo/gDMbN+KT3IdgECf8S//pCRA6RrNjcXIx
+ggF7MIIBdwIBATCBmTCBkjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxETAP
+BgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNvZnQgUHR5IEx0ZDEiMCAGA1UECxMZ
+REVNT05TVFJBVElPTiBBTkQgVEVTVElORzEbMBkGA1UEAxMSREVNTyBaRVJPIFZBTFVFIENB
+AgIEfjAJBgUrDgMCGgUAoHowGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAbBgkqhkiG9w0B
+CQ8xDjAMMAoGCCqGSIb3DQMHMBwGCSqGSIb3DQEJBTEPFw05ODA1MTQwMzM5MzdaMCMGCSqG
+SIb3DQEJBDEWBBQstNMnSV26ba8PapQEDhO21yNFrjANBgkqhkiG9w0BAQEFAARAW9Xb9YXv
+BfcNkutgFX9Gr8iXhBVsNtGEVrjrpkQwpKa7jHI8SjAlLhk/4RFwDHf+ISB9Np3Z1WDWnLcA
+9CWR6g==
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/t/c.pem b/main/openssl/crypto/pkcs7/t/c.pem
new file mode 100644
index 00000000..a4b55e32
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/c.pem
@@ -0,0 +1,48 @@
+issuer :/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=DEMONSTRATION AND TESTING/CN=DEMO ZERO VALUE CA
+subject:/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=SMIME 003/CN=Information/Email=info@cryptsoft.com
+serial :047D
+
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 1149 (0x47d)
+ Signature Algorithm: md5withRSAEncryption
+ Issuer: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=DEMONSTRATION AND TESTING, CN=DEMO ZERO VALUE CA
+ Validity
+ Not Before: May 13 05:40:58 1998 GMT
+ Not After : May 12 05:40:58 2000 GMT
+ Subject: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=SMIME 003, CN=Information/Email=info@cryptsoft.com
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Modulus:
+ 00:ad:e7:23:89:ee:0d:87:b7:9c:32:44:4b:95:81:
+ 73:dd:22:80:4b:2d:c5:60:b8:fe:1e:18:63:ef:dc:
+ 89:89:22:df:95:3c:7a:db:3d:9a:06:a8:08:d6:29:
+ fd:ef:41:09:91:ed:bc:ad:98:f9:f6:28:90:62:6f:
+ e7:e7:0c:4d:0b
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ Netscape Comment:
+ Generated with SSLeay
+ Signature Algorithm: md5withRSAEncryption
+ 52:15:ea:88:f4:f0:f9:0b:ef:ce:d5:f8:83:40:61:16:5e:55:
+ f9:ce:2d:d1:8b:31:5c:03:c6:2d:10:7c:61:d5:5c:0a:42:97:
+ d1:fd:65:b6:b6:84:a5:39:ec:46:ec:fc:e0:0d:d9:22:da:1b:
+ 50:74:ad:92:cb:4e:90:e5:fa:7d
+
+-----BEGIN CERTIFICATE-----
+MIICTDCCAfagAwIBAgICBH0wDQYJKoZIhvcNAQEEBQAwgZIxCzAJBgNVBAYTAkFV
+MRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UE
+ChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVBAsTGURFTU9OU1RSQVRJT04gQU5E
+IFRFU1RJTkcxGzAZBgNVBAMTEkRFTU8gWkVSTyBWQUxVRSBDQTAeFw05ODA1MTMw
+NTQwNThaFw0wMDA1MTIwNTQwNThaMIGeMQswCQYDVQQGEwJBVTETMBEGA1UECBMK
+UXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMRIwEAYDVQQLEwlTTUlNRSAwMDMxFDASBgNVBAMTC0luZm9ybWF0
+aW9uMSEwHwYJKoZIhvcNAQkBFhJpbmZvQGNyeXB0c29mdC5jb20wXDANBgkqhkiG
+9w0BAQEFAANLADBIAkEArecjie4Nh7ecMkRLlYFz3SKASy3FYLj+Hhhj79yJiSLf
+lTx62z2aBqgI1in970EJke28rZj59iiQYm/n5wxNCwIDAQABoygwJjAkBglghkgB
+hvhCAQ0EFxYVR2VuZXJhdGVkIHdpdGggU1NMZWF5MA0GCSqGSIb3DQEBBAUAA0EA
+UhXqiPTw+QvvztX4g0BhFl5V+c4t0YsxXAPGLRB8YdVcCkKX0f1ltraEpTnsRuz8
+4A3ZItobUHStkstOkOX6fQ==
+-----END CERTIFICATE-----
+
diff --git a/main/openssl/crypto/pkcs7/t/ff b/main/openssl/crypto/pkcs7/t/ff
new file mode 100644
index 00000000..23f01351
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/ff
@@ -0,0 +1,32 @@
+-----BEGIN PKCS7-----
+MIIGHgYJKoZIhvcNAQcCoIIGDzCCBgsCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
+BGswggJTMIIB/aADAgECAgIEfjANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCQVUxEzAR
+BgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNv
+ZnQgUHR5IEx0ZDEiMCAGA1UECxMZREVNT05TVFJBVElPTiBBTkQgVEVTVElORzEbMBkGA1UE
+AxMSREVNTyBa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TFVFIENBMFwwDQYJKoZIhvcNAQEB
+BQADSwAwSAJBAL+0E2fLej3FSCwe2A2iRnMuC3z12qHIp6Ky1wo2zZcxft7AI+RfkrWrSGtf
+mfzBEuPrLdfulncC5Y1pNcM8RTUCAwEAATANBgkqhkiG9w0BAQQFAANBAGSbLMphL6F5pp3s
+8o0Xyh86FHFdpVOwYx09ELLkuG17V/P9pgIc0Eo/gDMbN+KT3IdgECf8S//pCRA6RrNjcXIx
+ggF7MIIBdwIBATCBmTCBkjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxETAP
+BgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNvZnQgUHR5IEx0ZDEiMCAGA1UECxMZ
+REVNT05TVFJBVElPTiBBTkQgVEVTVElORzEbMBkGA1UEAxMSREVNTyBaRVJPIFZBTFVFIENB
+AgIEfjAJBgUrDgMCGgUAoHowGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAbBgkqhkiG9w0B
+CQ8xDjAMMAoGCCqGSIb3DQMHMBwGCSqGSIb3DQEJBTEPFw05ODA1MTQwMzM5MzdaMCMGCSqG
+SIb3DQEJBDEWBBQstNMnSV26ba8PapQEDhO21yNFrjANBgkqhkiG9w0BAQEFAARAW9Xb9YXv
+BfcNkutgFX9Gr8iXhBVsNtGEVrjrpkQwpKa7jHI8SjAlLhk/4RFwDHf+ISB9Np3Z1WDWnLcA
+9CWR6g==
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/t/msie-e b/main/openssl/crypto/pkcs7/t/msie-e
new file mode 100644
index 00000000..aafae69f
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-e
@@ -0,0 +1,20 @@
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHCMIHMAgEAMHYwYjERMA8GA1UEBxMISW50ZXJuZXQxFzAV
+BgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2lnbiBDbGFzcyAx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gj2HKza+4vJ0mzcC/1+GPsJjAEAA/JgIEDU4w6/DI
+/HQHhLAO3G+9xKD7MvmrzkoAAAAAAAAAAAAA
+
+
diff --git a/main/openssl/crypto/pkcs7/t/msie-e.pem b/main/openssl/crypto/pkcs7/t/msie-e.pem
new file mode 100644
index 00000000..a2a5e24e
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-e.pem
@@ -0,0 +1,22 @@
+-----BEGIN PKCS7-----
+MIAGCSqGSIb3DQEHA6CAMIIDkAIBADGCAcIwgcwCAQAwdjBiMREwDwYDVQQHEwhJ
+bnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAsTK1ZlcmlT
+aWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXICEGBAmILep9sJ
+uN2Pkg1gucowDQYJKoZIhvcNAQEBBQAEQIzO7zLBD+pls7xwAYxEEX6Y+u6/f4O9
+v1pY1naTyeNSCoXqZx2FUHYyQZywbeZ6ZFckGLG8xhZWRTeorhlW4qwwgfACAQAw
+gZkwgZIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
+EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVBAsT
+GURFTU9OU1RSQVRJT04gQU5EIFRFU1RJTkcxGzAZBgNVBAMTEkRFTU8gWkVSTyBW
+QUxVRSBDQQICBG4wDQYJKoZIhvcNAQEBBQAEQFxbBgUclskaGLO23uXO57ctz0If
+lYBvJH7YFne6/4nFl9GzU+5pY87BFrRWCzdjBImhF/FCPYaTTAWobWq3p3UwggHD
+BgkqhkiG9w0BBwEwGgYIKoZIhvcNAwIwDgICAKAECPL0ZT/zcdokgIIBmFHmyvHK
+ynLsN+iZEn19/x4wK1o3ASgTHsbbk9lGicLnuEG8ahJwu0Q9Tdan0URs83ugkRJ4
+L4CoxPJMs3LxpCzILmzncT1SSgi+DrZ6RhkFtdmpeyvHHg+GKJfc0fwZWHjamEHQ
+KGPDScodl5EObEZjcKaT4n6XS5UrFs0h8kgo6C4sGeGqacof8+ufMO3n3W7RQvLZ
+pMupGb7j/Vhq39A9vol6gobA08FtL2iAF2sI0Kn1kWDddqvYC1AfPJNAh9h4fdJF
+BSkqZGblTmj2nl6aAR1P5l8mb8ni1Ic6ZuAAWxsdBqQDgwFngnmp8MmE4DaDmVaT
+WEh67kOf8BotFl3TLPehjQh6j96s9bH9sKq0HNhsx72pIVN50qVtz0QZ7eik5N0F
+lXMrwoffDfOzLmW7Ep05Qbn1hhvkXUhmJYaIPK6j8e5pxf6CuK7kt4NsTM61meSj
+5Nle9YiSjfR8Pv2PdPgxFGFZduCPYcrNr7i8nSbNwL/X4Y+wmMAQAD8mAgQNTjDr
+8Mj8dAeEsA7cb73EoPsy+avOSgAAAAA=
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/t/msie-enc-01 b/main/openssl/crypto/pkcs7/t/msie-enc-01
new file mode 100644
index 00000000..2c93ab64
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-enc-01
@@ -0,0 +1,62 @@
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxgfMwgfACAQAwgZkwgZIxCzAJBgNVBAYTAkFVMRMwEQYD
+VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRzb2Z0
+IFB0eSBMdGQxIjAgBgNVBAsTGURFTU9OU1RSQVRJT04gQU5EIFRFU1RJTkcxGzAZBgNVBAMT
+EkRFTU8gWkVSTyBWQUxVRSBDQQICBG4wDQYJKoZIhvcNAQEBBQAEQKvMaW8xh6oF/X+CJivz
+IZV7yHxlp4O3NHQtWG0A8MOZB+CtKlU7/6g5e/a9Du/TOqxRMqtYRp63pa2Q/mM4IYMwgAYJ
+KoZIhvcNAQcBMBoGCCqGSIb3DQMCMA4CAgCgBAifz6RvzOPYlKCABI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j68fkqJ0fKJRWVLWuW/O3VE4BOPKwFlaIECFseVTdDUho8BAj+cOKvV2WA
+hgQgaXr+wwq+ItblG0Qxz8IVUXX6PV2mIdHwz4SCCvnCsaIECJhBYxdfLI/XBCDswamPn9MR
+yXi2HVQBineV+GtWVkIoZ2dCLFB9mQRMoAQI0nUR5a5AOJoECA+AunKlAlx8BAi5RtFeF4g1
+FQQIz/ie+16LlQcECOmNuVg5DXjMBAjH2nkfpXZgWwQIVdLuO/+kuHAECO/5rEHmyI9vBBD4
+16BU4Rd3YerDQnHtrwOQBCCkho1XxK5Maz8KLCNi20wvcGt8wsIXlj2h5q9ITBq7IgQQvKVY
+4OfJ7bKbItP2dylwQgQYPIGxwkkbRXNraONYvN19G8UdF35rFOuIBAjf0sKz/618ZQQIxObr
+xJkRe0sECIC+ssnjEb2NBBBI+XM4OntVWGsRV9Td3sFgBAinGwIroo8O0gQQMGAwgc9PaLaG
+gBCiwSTrYQQIVHjfCQgOtygEUIoraFoANfhZgIShpOd/RRxFU4/7xZR5tMdGoYz/g0thR0lM
++Hi88FtFD4mAh/Oat4Ri8B7bv04aokjN2UHz6nPbHHjZ8zIqpbYTCy043GNZBAhOqjyB2JbD
+NwQoR23XCYD9x6E20ChHJRXmaHwyMdYXKl5CUxypl7ois+sy2D7jDukS3wQIsTyyPgJi0GsA
+AAAAAAAAAAAA
+
diff --git a/main/openssl/crypto/pkcs7/t/msie-enc-01.pem b/main/openssl/crypto/pkcs7/t/msie-enc-01.pem
new file mode 100644
index 00000000..9abf00b2
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-enc-01.pem
@@ -0,0 +1,66 @@
+-----BEGIN PKCS7-----
+MIAGCSqGSIb3DQEHA6CAMIILyAIBADGB8zCB8AIBADCBmTCBkjELMAkGA1UEBhMC
+QVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcTCEJyaXNiYW5lMRowGAYD
+VQQKExFDcnlwdHNvZnQgUHR5IEx0ZDEiMCAG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2FO
+ZJVkM8I30q9jfVlMKhAqQButL22eNefUjf5nrPx3eINo/YWHmFghbJMZWINR29lf
+APe+kEyZbbZWbUV+PqHZdSLJN/rx+SonR8olFZUta5b87dUTgE48rAWVolseVTdD
+Uho8/nDir1dlgIZpev7DCr4i1uUbRDHPwhVRdfo9XaYh0fDPhIIK+cKxophBYxdf
+LI/X7MGpj5/TEcl4th1UAYp3lfhrVlZCKGdnQixQfZkETKDSdRHlrkA4mg+AunKl
+Alx8uUbRXheINRXP+J77XouVB+mNuVg5DXjMx9p5H6V2YFtV0u47/6S4cO/5rEHm
+yI9v+NegVOEXd2Hqw0Jx7a8DkKSGjVfErkxrPwosI2LbTC9wa3zCwheWPaHmr0hM
+GrsivKVY4OfJ7bKbItP2dylwQjyBscJJG0Vza2jjWLzdfRvFHRd+axTriN/SwrP/
+rXxlxObrxJkRe0uAvrLJ4xG9jUj5czg6e1VYaxFX1N3ewWCnGwIroo8O0jBgMIHP
+T2i2hoAQosEk62FUeN8JCA63KIoraFoANfhZgIShpOd/RRxFU4/7xZR5tMdGoYz/
+g0thR0lM+Hi88FtFD4mAh/Oat4Ri8B7bv04aokjN2UHz6nPbHHjZ8zIqpbYTCy04
+3GNZTqo8gdiWwzdHbdcJgP3HoTbQKEclFeZofDIx1hcqXkJTHKmXuiKz6zLYPuMO
+6RLfsTyyPgJi0GsAAAAA
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/t/msie-enc-02 b/main/openssl/crypto/pkcs7/t/msie-enc-02
new file mode 100644
index 00000000..70170559
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-enc-02
@@ -0,0 +1,90 @@
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHCMIHMAgEAMHYwYjERMA8GA1UEBxMISW50ZXJuZXQxFzAV
+BgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5k
+aXZpZHVhbCBTdWJzY3JpYmV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Y2/E/T31iijRH29rvYHGI+mP/ieYs45iq4fTWo6i1HofeWLdP0fX7xW3XO0/hWYFiw
+BxKu66whAbRhaib3XJNvetVs25ToYXyiDpjG+cd5rCMei8sGQwTBj9Zeh0URoeMW1inTP0JvCmMU
+rZgAAAAAAAAAAAAA
+
diff --git a/main/openssl/crypto/pkcs7/t/msie-enc-02.pem b/main/openssl/crypto/pkcs7/t/msie-enc-02.pem
new file mode 100644
index 00000000..279c5d83
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-enc-02.pem
@@ -0,0 +1,106 @@
+-----BEGIN PKCS7-----
+MIAGCSqGSIb3DQEHA6CAMIITQAIBADGCAcIwgcwCAQAwdjBiMREwDwYDVQQHEwhJ
+bnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAsTK1ZlcmlT
+aWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXICEGBAmILep9sJ
+uN2Pkg1gucowDQYJKoZIhvcNAQEBBQAEQAKvi2eRLO+jdoiUd8ksZt+iQ0JXoWN0
+M/W9CEv6R1c42pwUIR/1F4RMK9oeyUiv9Z6lzmPaGNmx6XOCoueszVkwgfACAQAw
+gZkwgZIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
+EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVBAsT
+GURFTU9OU1RSQVRJT04gQU5EIFRFU1RJTkcxGzAZBgNVBAMTEkRFTU8gWkVSTyBW
+QUxVRSBDQQICBG4wDQYJKoZIhvcNAQEBBQAEQFqcHEo69ShGfcOIVjnmWXLZM+7Y
+K/50j8YuvNbqq+dQxk9YY8ZpSU/JYsxmtcnEZdlSJEkpMHAO73V+eh1QQr0wghFz
+BgkqhkiG9w0BBwEwGgYIKoZIhvcNAwIwDgICAKAECJsSmRA1jxLjgIIRSIGLVtf+
+pz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YYzvISovw7pCCczq0gMVL1evINos3Nw
+aExaoy+HM7qwL8ADZZ8uDBLnXsKnTciQlBaob2rDnb4T4YC2mKgl9zMSGW/0GuGO
+2126BFKMmsbxJhVgTjMbcC6vl40GgZoAsg4c60/Dz4mi9CYhZwWhon9ZC6CUWta1
+7DnUgroXxGIcA4FVq9k65lw7u1X7l6dV+t453Stfxk7LiFiYeGYXWE6utY6f4R4T
+RJgqidc3TUEz3EywrzQKaZxj01Bo8GzCUYNVSdijIgVh+aCafLcnyAMTLlhXbWi2
+G0Ujg12zgLIT1SvCQGPA0A5M6mgkwJC030kQLfcmOkm1KTLEb+8WvJzGTSQScyU/
+W/8DY4IjiYGhriTJFdoPw19o3z9z6zDP0m58+3nTkVx49T2uV00/JxuTEtBbmYL3
+r3at6P4FVQM/mQijh90oTM2b36dNZUl+YGiU35ZlOnHTcLZ9smeiEnBezq41HgPY
+hKElUfXUHAPuJQd0QBtyzMHJ8V2N+Q+/jzCcxyGXRXEp6vp9NwAmNvxP099Yoo0R
+9va72BxiPpj/4nmLOOYquH01qOotR6H3li3T9H1+8Vt1ztP4VmBYsAcSruusIQG0
+YWom91yTb3rVbNuU6GF8og6YxvnHeawjHovLBkMEwY/WXodFEaHjFtYp0z9Cbwpj
+FK2YAAAAAA==
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/t/msie-s-a-e b/main/openssl/crypto/pkcs7/t/msie-s-a-e
new file mode 100644
index 00000000..0067794d
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-s-a-e
@@ -0,0 +1,91 @@
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHCMIHMAgEAMHYwYjERMA8GA1UEBxMISW50ZXJuZXQxFzAV
+BgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5k
+aXZpZHVhbCBTdWJzY3JpYmVyAhBgQJiC3qfbCbjdj5INYLnKMA0GCSqGSIb3DQEBAQ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IyTekhFDOk0Nmx057eonlyGgmGpl5/Uo+t1J1Z11Ya/l
+bNbfmebRISJeTVW0I8FhseAZMI1GSwp/ludJxSLYOgyRkh+GX134MexNo7O9F1SxLCfWaSG9Fc3s
+5ify04ua9/t8SGrYZPm/l3MkAAAAAAAAAAAAAA==
+
+
diff --git a/main/openssl/crypto/pkcs7/t/msie-s-a-e.pem b/main/openssl/crypto/pkcs7/t/msie-s-a-e.pem
new file mode 100644
index 00000000..55dbd8f8
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/msie-s-a-e.pem
@@ -0,0 +1,106 @@
+-----BEGIN PKCS7-----
+MIAGCSqGSIb3DQEHA6CAMIITUAIBADGCAcIwgcwCAQAwdjBiMREwDwYDVQQHEwhJ
+bnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAsTK1ZlcmlT
+aWduIENsYXNzIDEgQ0EgLSBJbmRpdmlkdWFsIFN1YnNjcmliZXICEGBAmILep9sJ
+uN2Pkg1gucowDQYJKoZIhvcNAQEBBQAEQKOxxpIbRTb31+qIQCBOpMVAGnwCLrPO
+OXnntxVveTrPhBnsJuoGNJcCMtuHl7tLkd38WsVwOfGXUprTqFpUcY8wgfACAQAw
+gZkwgZIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
+EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVBAsT
+GURFTU9OU1RSQVRJT04gQU5EIFRFU1RJTkcxGzAZBgNVBAMTEkRFTU8gWkVSTyBW
+QUxVRSBDQQICBG4wDQYJKoZIhvcNAQEBBQAEQKzIddnXFqK/RRBG86ZVixoXfwAv
+ZdfvnDFsKzPn/A6DuDdE/hqJxnFpHiwGiDR/YbWj2ib+G74DSshgX8vj8ZQwghGD
+BgkqhkiG9w0BBwEwGgYIKoZIhvcNAwIwDgICAKAECLKM0K58I3HNgIIRWBDP8s+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xsED8dhvH01drOvv
+Oc/j8yW/ellOgRxi36WAscACu1QB2HJuFssjA0yrSCvoTC0OSUFreezhbH+slTwf
+ssazqBXy6p5pKR62/6fP6xCF9y3FnWvH7mrNd/IU5BWk7bcoNC6cGLUGX2TrUOLi
+r0lZzIAMFc8dcnOnuYvwWTvN28wAR+4QPWmF1GboaANihhSzjJAiuFKMWVbKTuFP
+zjvnGTcEi/76hu9ZIC//f6kXoDpTZFcMKFWacbQmc9r3Bhi13MGYt9koGNf4OMPI
+Qyy6E+wLO43hHq0lUSpisHZGrZqbEAYA8OPLtPwK335efw0ZUvXnvkH3xXnFIrQ3
+QivpLV+S9nxmKy+YOkpbZ3DCHldabceJ7kowvzveOKtSmLar0IjxViahFyETDW22
+DguO7Iy82tLRBa4pjcMXK1hks7MuUfW3hUNWhz3DKw1nwqL4jUZNqj7cbiiAuUJN
+mbjpiS4woi8FBhG9P9TKc79zKkGu3ZkWsl4Nw2ViT2o8TWb+nkt+exJTL8BkJqmn
+29ppUCcFi7IPZvTxu7qhKMq6knOjIrmPonCxBYm/Yzn0UK8e9K00ilH06+DLT9Gm
+WQHn4wq6VSMk3pIRQzpNDZsdOe3qJ5choJhqZef1KPrdSdWddWGv5WzW35nm0SEi
+Xk1VtCPBYbHgGTCNRksKf5bnScUi2DoMkZIfhl9d+DHsTaOzvRdUsSwn1mkhvRXN
+7OYn8tOLmvf7fEhq2GT5v5dzJAAAAAA=
+-----END PKCS7-----
diff --git a/main/openssl/crypto/pkcs7/t/nav-smime b/main/openssl/crypto/pkcs7/t/nav-smime
new file mode 100644
index 00000000..6ee4b597
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/nav-smime
@@ -0,0 +1,157 @@
+From angela@c2.net.au Thu May 14 13:32:27 1998
+X-UIDL: 83c94dd550e54329bf9571b72038b8c8
+Return-Path: angela@c2.net.au
+Received: from cryptsoft.com (play.cryptsoft.com [203.56.44.3]) by pandora.cryptsoft.com (8.8.3/8.7.3) with ESMTP id NAA27838 for <tjh@cryptsoft.com>; Thu, 14 May 1998 13:32:26 +1000 (EST)
+Message-ID: <355A6779.4B63E64C@cryptsoft.com>
+Date: Thu, 14 May 1998 13:39:37 +1000
+From: Angela van Lent <angela@c2.net.au>
+X-Mailer: Mozilla 4.03 [en] (Win95; U)
+MIME-Version: 1.0
+To: tjh@cryptsoft.com
+Subject: signed
+Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms9A58844C95949ECC78A1C54C"
+Content-Length: 2604
+Status: OR
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms9A58844C95949ECC78A1C54C
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+signed body
+
+--------------ms9A58844C95949ECC78A1C54C
+Content-Type: application/x-pkcs7-signature; name="smime.p7s"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="smime.p7s"
+Content-Description: S/MIME Cryptographic Signature
+
+MIIGHgYJKoZIhvcNAQcCoIIGDzCCBgsCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
+BGswggJTMIIB/aADAgECAgIEfjANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCQVUxEzAR
+BgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNv
+ZnQgUHR5IEx0ZDEiMCAGA1UECxMZREVNT05TVFJBVElPTiBBTkQgVEVTVElORzEbMBkGA1UE
+AxMSREVNTyBaRVJPIFZBTFVFIENBMB4XDTk4MDUxMzA2MjY1NloXDTAwMDUxMjA2MjY1Nlow
+gaUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFu
+ZTEaMBgGA1UEChMRQ3J5cHRzb2Z0IFB0eSBMdGQxEjAQBgNVBAsTCVNNSU1FIDAwMzEZMBcG
+A1UEAxMQQW5nZWxhIHZhbiBMZWVudDEjMCEGCSq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BdwIBATCBmTCBkjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxETAP
+BgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNvZnQgUHR5IEx0ZDEiMCAGA1UECxMZ
+REVNT05TVFJBVElPTiBBTkQgVEVTVElORzEbMBkGA1UEAxMSREVNTyBaRVJPIFZBTFVFIENB
+AgIEfjAJBgUrDgMCGgUAoHowGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAbBgkqhkiG9w0B
+CQ8xDjAMMAoGCCqGSIb3DQMHMBwGCSqGSIb3DQEJBTEPFw05ODA1MTQwMzM5MzdaMCMGCSqG
+SIb3DQEJBDEWBBQstNMnSV26ba8PapQEDhO21yNFrjANBgkqhkiG9w0BAQEFAARAW9Xb9YXv
+BfcNkutgFX9Gr8iXhBVsNtGEVrjrpkQwpKa7jHI8SjAlLhk/4RFwDHf+ISB9Np3Z1WDWnLcA
+9CWR6g==
+--------------ms9A58844C95949ECC78A1C54C--
+
+
+From angela@c2.net.au Thu May 14 13:33:16 1998
+X-UIDL: 8f076c44ff7c5967fd5b00c4588a8731
+Return-Path: angela@c2.net.au
+Received: from cryptsoft.com (play.cryptsoft.com [203.56.44.3]) by pandora.cryptsoft.com (8.8.3/8.7.3) with ESMTP id NAA27847 for <tjh@cryptsoft.com>; Thu, 14 May 1998 13:33:15 +1000 (EST)
+Message-ID: <355A67AB.2AF38806@cryptsoft.com>
+Date: Thu, 14 May 1998 13:40:27 +1000
+From: Angela van Lent <angela@c2.net.au>
+X-Mailer: Mozilla 4.03 [en] (Win95; U)
+MIME-Version: 1.0
+To: tjh@cryptsoft.com
+Subject: signed
+Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------msD7863B84BD61E02C407F2F5E"
+Content-Length: 2679
+Status: OR
+
+This is a cryptographically signed message in MIME format.
+
+--------------msD7863B84BD61E02C407F2F5E
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+signed body 2
+
+--------------msD7863B84BD61E02C407F2F5E
+Content-Type: application/x-pkcs7-signature; name="smime.p7s"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="smime.p7s"
+Content-Description: S/MIME Cryptographic Signature
+
+MIIGVgYJKoZIhvcNAQcCoIIGRzCCBkMCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
+BGswggJTMIIB/aADAgECAgIEfjANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCQVUxEzAR
+BgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdHNv
+ZnQgUHR5IEx0ZDEiMCAGA1UECxMZREVNT05TVFJBVElPTiBBTkQgVEVTVElORzEbMBkGA1UE
+AxMSREVNTyBaRVJPIFZBTFVFIENBMB4XDTk4MDUxMzA2MjY1NloXDTAwMDUxMjA2MjY1Nlow
+gaUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFu
+ZTEaMBgGA1UEChMRQ3J5cHRzb2Z0IFB0eSBMdGQxEjAQBgNVBAsTCVNNSU1FIDAwMzEZMBcG
+A1UEAxMQQW5nZWxhIHZhbiBMZWVudDEjMCEGCSqGSIb3DQEJARYUYW5nZWxhQGNyeXB0c29m
+dC5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAuC3+7dAb2LhuO7gt2cTM8vsNjhG5JfDh
+hX1Vl/wVGbKEEj0MA6vWEolvefQlxB+EzwCtR0YZ7eEC/T/4JoCyeQIDAQABoygwJjAkBglg
+hkgBhvhCAQ0EFxYVR2VuZXJhdGVkIHdpdGggU1NMZWF5MA0GCSqGSIb3DQEBBAUAA0EAUnSP
+igs6TMFISTjw8cBtJYb98czgAVkVFjKyJQwYMH8FbDnCyx6NocM555nsyDstaw8fKR11Khds
+syd3ikkrhDCCAhAwggG6AgEDMA0GCSqGSI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qJN
+rwdDMFIGCSqGSIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMAcGBSsO
+AwIHMA0GCCqGSIb3DQMCAgFAMA0GCCqGSIb3DQMCAgEoMA0GCSqGSIb3DQEBAQUABEADPE/N
+coH+zTFuX5YpolupTKxKK8eEjc48TuADuO8bIHHDE/fEYaWunlwDuTlcFJl1ig0idffPB1qC
+Zp8SSVVY
+--------------msD7863B84BD61E02C407F2F5E--
+
+
+From angela@c2.net.au Thu May 14 14:05:32 1998
+X-UIDL: a7d629b4b9acacaee8b39371b860a32a
+Return-Path: angela@c2.net.au
+Received: from cryptsoft.com (play.cryptsoft.com [203.56.44.3]) by pandora.cryptsoft.com (8.8.3/8.7.3) with ESMTP id OAA28033 for <tjh@cryptsoft.com>; Thu, 14 May 1998 14:05:32 +1000 (EST)
+Message-ID: <355A6F3B.AC385981@cryptsoft.com>
+Date: Thu, 14 May 1998 14:12:43 +1000
+From: Angela van Lent <angela@c2.net.au>
+X-Mailer: Mozilla 4.03 [en] (Win95; U)
+MIME-Version: 1.0
+To: tjh@cryptsoft.com
+Subject: encrypted
+Content-Type: application/x-pkcs7-mime; name="smime.p7m"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="smime.p7m"
+Content-Description: S/MIME Encrypted Message
+Content-Length: 905
+Status: OR
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggHmMIHwAgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEG
+A1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNUUkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQD
+ExJERU1PIFpFUk8gVkFMVUUgQ0ECAgR+MA0GCSqGSIb3DQEBAQUABEA92N29Yk39RUY2tIVd
+exGT2MFX3J6H8LB8aDRJjw7843ALgJ5zXpM5+f80QkAWwEN2A6Pl3VxiCeKLi435zXVyMIHw
+AgEAMIGZMIGSMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMI
+QnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29mdCBQdHkgTHRkMSIwIAYDVQQLExlERU1PTlNU
+UkFUSU9OIEFORCBURVNUSU5HMRswGQYDVQQDExJERU1PIFpFUk8gVkFMVUUgQ0ECAgRuMA0G
+CSqGSIb3DQEBAQUABECR9IfyHtvnjFmZ8B2oUCEs1vxMsG0u1kxKE4RMPFyDqDCEARq7zXMg
+nzSUI7Wgv5USSKDqcLRJeW+jvYURv/nJMIAGCSqGSIb3DQEHATAaBggqhkiG9w0DAjAOAgIA
+oAQIrLqrij2ZMpeggAQoibtn6reRZWuWk5Iv5IAhgitr8EYE4w4ySQ7EMB6mTlBoFpccUMWX
+BwQgQn1UoWCvYAlhDzURdbui64Dc0rS2wtj+kE/InS6y25EEEPe4NUKaF8/UlE+lo3LtILQE
+CL3uV8k7m0iqAAAAAAAAAAAAAA==
+
diff --git a/main/openssl/crypto/pkcs7/t/s.pem b/main/openssl/crypto/pkcs7/t/s.pem
new file mode 100644
index 00000000..4fa925b1
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/s.pem
@@ -0,0 +1,57 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOgIBAAJBAK3nI4nuDYe3nDJES5WBc90igEstxWC4/h4YY+/ciYki35U8ets9
+mgaoCNYp/e9BCZHtvK2Y+fYokGJv5+cMTQsCAwEAAQJBAIHpvXvqEcOEoDRRHuIG
+fkcB4jPHcr9KE9TpxabH6xs9beN6OJnkePXAHwaz5MnUgSnbpOKq+cw8miKjXwe/
+zVECIQDVLwncT2lRmXarEYHzb+q/0uaSvKhWKKt3kJasLNTrAwIhANDUc/ghut29
+p3jJYjurzUKuG774/5eLjPLsxPPIZzNZAiA/10hSq41UnGqHLEUIS9m2/EeEZe7b
+bm567dfRU9OnVQIgDo8ROrZXSchEGbaog5J5r/Fle83uO8l93R3GqVxKXZkCIFfk
+IPD5PIYQAyyod3hyKKza7ZP4CGY4oOfZetbkSGGG
+-----END RSA PRIVATE KEY-----
+issuer :/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=DEMONSTRATION AND TESTING/CN=DEMO ZERO VALUE CA
+subject:/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=SMIME 003/CN=Information/Email=info@cryptsoft.com
+serial :047D
+
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 1149 (0x47d)
+ Signature Algorithm: md5withRSAEncryption
+ Issuer: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=DEMONSTRATION AND TESTING, CN=DEMO ZERO VALUE CA
+ Validity
+ Not Before: May 13 05:40:58 1998 GMT
+ Not After : May 12 05:40:58 2000 GMT
+ Subject: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=SMIME 003, CN=Information/Email=info@cryptsoft.com
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Modulus:
+ 00:ad:e7:23:89:ee:0d:87:b7:9c:32:44:4b:95:81:
+ 73:dd:22:80:4b:2d:c5:60:b8:fe:1e:18:63:ef:dc:
+ 89:89:22:df:95:3c:7a:db:3d:9a:06:a8:08:d6:29:
+ fd:ef:41:09:91:ed:bc:ad:98:f9:f6:28:90:62:6f:
+ e7:e7:0c:4d:0b
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ Netscape Comment:
+ Generated with SSLeay
+ Signature Algorithm: md5withRSAEncryption
+ 52:15:ea:88:f4:f0:f9:0b:ef:ce:d5:f8:83:40:61:16:5e:55:
+ f9:ce:2d:d1:8b:31:5c:03:c6:2d:10:7c:61:d5:5c:0a:42:97:
+ d1:fd:65:b6:b6:84:a5:39:ec:46:ec:fc:e0:0d:d9:22:da:1b:
+ 50:74:ad:92:cb:4e:90:e5:fa:7d
+
+-----BEGIN CERTIFICATE-----
+MIICTDCCAfagAwIBAgICBH0wDQYJKoZIhvcNAQEEBQAwgZIxCzAJBgNVBAYTAkFV
+MRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UE
+ChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVBAsTGURFTU9OU1RSQVRJT04gQU5E
+IFRFU1RJTkcxGzAZBgNVBAMTEkRFTU8gWkVSTyBWQUxVRSBDQTAeFw05ODA1MTMw
+NTQwNThaFw0wMDA1MTIwNTQwNThaMIGeMQswCQYDVQQGEwJBVTETMBEGA1UECBMK
+UXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0c29m
+dCBQdHkgTHRkMRIwEAYDVQQLEwlTTUlNRSAwMDMxFDASBgNVBAMTC0luZm9ybWF0
+aW9uMSEwHwYJKoZIhvcNAQkBFhJpbmZvQGNyeXB0c29mdC5jb20wXDANBgkqhkiG
+9w0BAQEFAANLADBIAkEArecjie4Nh7ecMkRLlYFz3SKASy3FYLj+Hhhj79yJiSLf
+lTx62z2aBqgI1in970EJke28rZj59iiQYm/n5wxNCwIDAQABoygwJjAkBglghkgB
+hvhCAQ0EFxYVR2VuZXJhdGVkIHdpdGggU1NMZWF5MA0GCSqGSIb3DQEBBAUAA0EA
+UhXqiPTw+QvvztX4g0BhFl5V+c4t0YsxXAPGLRB8YdVcCkKX0f1ltraEpTnsRuz8
+4A3ZItobUHStkstOkOX6fQ==
+-----END CERTIFICATE-----
+
diff --git a/main/openssl/crypto/pkcs7/t/server.pem b/main/openssl/crypto/pkcs7/t/server.pem
new file mode 100644
index 00000000..989baf87
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/t/server.pem
@@ -0,0 +1,57 @@
+issuer :/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=DEMONSTRATION AND TESTING/CN=DEMO ZERO VALUE CA
+subject:/C=AU/SP=Queensland/L=Brisbane/O=Cryptsoft Pty Ltd/OU=SMIME 003/CN=Information/Email=info@cryptsoft.com
+serial :047D
+
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 1149 (0x47d)
+ Signature Algorithm: md5withRSAEncryption
+ Issuer: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=DEMONSTRATION AND TESTING, CN=DEMO ZERO VALUE CA
+ Validity
+ Not Before: May 13 05:40:58 1998 GMT
+ Not After : May 12 05:40:58 2000 GMT
+ Subject: C=AU, SP=Queensland, L=Brisbane, O=Cryptsoft Pty Ltd, OU=SMIME 003, CN=Information/Email=info@cryptsoft.com
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Modulus:
+ 00:ad:e7:23:89:ee:0d:87:b7:9c:32:44:4b:95:81:
+ 73:dd:22:80:4b:2d:c5:60:b8:fe:1e:18:63:ef:dc:
+ 89:89:22:df:95:3c:7a:db:3d:9a:06:a8:08:d6:29:
+ fd:ef:41:09:91:ed:bc:ad:98:f9:f6:28:90:62:6f:
+ e7:e7:0c:4d:0b
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ Netscape Comment:
+ Generated with SSLeay
+ Signature Algorithm: md5withRSAEncryption
+ 52:15:ea:88:f4:f0:f9:0b:ef:ce:d5:f8:83:40:61:16:5e:55:
+ f9:ce:2d:d1:8b:31:5c:03:c6:2d:10:7c:61:d5:5c:0a:42:97:
+ d1:fd:65:b6:b6:84:a5:39:ec:46:ec:fc:e0:0d:d9:22:da:1b:
+ 50:74:ad:92:cb:4e:90:e5:fa:7d
+
+-----BEGIN CERTIFICATE-----
+MIICTDCCAfagAwIBAgICBH0wDQYJKoZIhvcNAQEEBQAwgZIxCzAJBgNVBAYTAkFV
+MRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UE
+ChMRQ3J5cHRzb2Z0IFB0eSBMdGQxIjAgBgNVB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PIYQAyyod3hyKKza7ZP4CGY4oOfZetbkSGGG
+-----END RSA PRIVATE KEY-----
diff --git a/main/openssl/crypto/pkcs7/verify.c b/main/openssl/crypto/pkcs7/verify.c
new file mode 100644
index 00000000..b40f2603
--- /dev/null
+++ b/main/openssl/crypto/pkcs7/verify.c
@@ -0,0 +1,263 @@
+/* crypto/pkcs7/verify.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+#include <stdio.h>
+#include <string.h>
+#include <openssl/bio.h>
+#include <openssl/asn1.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+#include "example.h"
+
+int verify_callback(int ok, X509_STORE_CTX *ctx);
+
+BIO *bio_err=NULL;
+BIO *bio_out=NULL;
+
+int main(argc,argv)
+int argc;
+char *argv[];
+ {
+ PKCS7 *p7;
+ PKCS7_SIGNER_INFO *si;
+ X509_STORE_CTX cert_ctx;
+ X509_STORE *cert_store=NULL;
+ BIO *data,*detached=NULL,*p7bio=NULL;
+ char buf[1024*4];
+ char *pp;
+ int i,printit=0;
+ STACK_OF(PKCS7_SIGNER_INFO) *sk;
+
+ bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
+ bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
+#ifndef OPENSSL_NO_MD2
+ EVP_add_digest(EVP_md2());
+#endif
+#ifndef OPENSSL_NO_MD5
+ EVP_add_digest(EVP_md5());
+#endif
+#ifndef OPENSSL_NO_SHA1
+ EVP_add_digest(EVP_sha1());
+#endif
+#ifndef OPENSSL_NO_MDC2
+ EVP_add_digest(EVP_mdc2());
+#endif
+
+ data=BIO_new(BIO_s_file());
+
+ pp=NULL;
+ while (argc > 1)
+ {
+ argc--;
+ argv++;
+ if (strcmp(argv[0],"-p") == 0)
+ {
+ printit=1;
+ }
+ else if ((strcmp(argv[0],"-d") == 0) && (argc >= 2))
+ {
+ detached=BIO_new(BIO_s_file());
+ if (!BIO_read_filename(detached,argv[1]))
+ goto err;
+ argc--;
+ argv++;
+ }
+ else
+ {
+ pp=argv[0];
+ if (!BIO_read_filename(data,argv[0]))
+ goto err;
+ }
+ }
+
+ if (pp == NULL)
+ BIO_set_fp(data,stdin,BIO_NOCLOSE);
+
+
+ /* Load the PKCS7 object from a file */
+ if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL,NULL)) == NULL) goto err;
+
+ /* This stuff is being setup for certificate verification.
+ * When using SSL, it could be replaced with a
+ * cert_stre=SSL_CTX_get_cert_store(ssl_ctx); */
+ cert_store=X509_STORE_new();
+ X509_STORE_set_default_paths(cert_store);
+ X509_STORE_load_locations(cert_store,NULL,"../../certs");
+ X509_STORE_set_verify_cb_func(cert_store,verify_callback);
+
+ ERR_clear_error();
+
+ /* We need to process the data */
+ if ((PKCS7_get_detached(p7) || detached))
+ {
+ if (detached == NULL)
+ {
+ printf("no data to verify the signature on\n");
+ exit(1);
+ }
+ else
+ p7bio=PKCS7_dataInit(p7,detached);
+ }
+ else
+ {
+ p7bio=PKCS7_dataInit(p7,NULL);
+ }
+
+ /* We now have to 'read' from p7bio to calculate digests etc. */
+ for (;;)
+ {
+ i=BIO_read(p7bio,buf,sizeof(buf));
+ /* print it? */
+ if (i <= 0) break;
+ }
+
+ /* We can now verify signatures */
+ sk=PKCS7_get_signer_info(p7);
+ if (sk == NULL)
+ {
+ printf("there are no signatures on this data\n");
+ exit(1);
+ }
+
+ /* Ok, first we need to, for each subject entry, see if we can verify */
+ for (i=0; i<sk_PKCS7_SIGNER_INFO_num(sk); i++)
+ {
+ ASN1_UTCTIME *tm;
+ char *str1,*str2;
+ int rc;
+
+ si=sk_PKCS7_SIGNER_INFO_value(sk,i);
+ rc=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si);
+ if (rc <= 0)
+ goto err;
+ printf("signer info\n");
+ if ((tm=get_signed_time(si)) != NULL)
+ {
+ BIO_printf(bio_out,"Signed time:");
+ ASN1_UTCTIME_print(bio_out,tm);
+ ASN1_UTCTIME_free(tm);
+ BIO_printf(bio_out,"\n");
+ }
+ if (get_signed_seq2string(si,&str1,&str2))
+ {
+ BIO_printf(bio_out,"String 1 is %s\n",str1);
+ BIO_printf(bio_out,"String 2 is %s\n",str2);
+ }
+
+ }
+
+ X509_STORE_free(cert_store);
+
+ printf("done\n");
+ exit(0);
+err:
+ ERR_load_crypto_strings();
+ ERR_print_errors_fp(stderr);
+ exit(1);
+ }
+
+/* should be X509 * but we can just have them as char *. */
+int verify_callback(int ok, X509_STORE_CTX *ctx)
+ {
+ char buf[256];
+ X509 *err_cert;
+ int err,depth;
+
+ err_cert=X509_STORE_CTX_get_current_cert(ctx);
+ err= X509_STORE_CTX_get_error(ctx);
+ depth= X509_STORE_CTX_get_error_depth(ctx);
+
+ X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256);
+ BIO_printf(bio_err,"depth=%d %s\n",depth,buf);
+ if (!ok)
+ {
+ BIO_printf(bio_err,"verify error:num=%d:%s\n",err,
+ X509_verify_cert_error_string(err));
+ if (depth < 6)
+ {
+ ok=1;
+ X509_STORE_CTX_set_error(ctx,X509_V_OK);
+ }
+ else
+ {
+ ok=0;
+ X509_STORE_CTX_set_error(ctx,X509_V_ERR_CERT_CHAIN_TOO_LONG);
+ }
+ }
+ switch (ctx->error)
+ {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+ X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,256);
+ BIO_printf(bio_err,"issuer= %s\n",buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ BIO_printf(bio_err,"notBefore=");
+ ASN1_UTCTIME_print(bio_err,X509_get_notBefore(ctx->current_cert));
+ BIO_printf(bio_err,"\n");
+ break;
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ BIO_printf(bio_err,"notAfter=");
+ ASN1_UTCTIME_print(bio_err,X509_get_notAfter(ctx->current_cert));
+ BIO_printf(bio_err,"\n");
+ break;
+ }
+ BIO_printf(bio_err,"verify return:%d\n",ok);
+ return(ok);
+ }