Re: File signing/encrypting upgrade from 1.0.2 to 1.1.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 2018-03-28 00:40, schrieb Jan Kohnert:
> Hi,
> 
> Am Tue, 27 Mar 2018 18:24:25 +0000
> schrieb Sergio NNX <sfhacker@xxxxxxxxxxx>:
> 
>> > The code comiles just fine
>> 
>> Unfortunately, it does NOT compile fine on my system (and I guess the
>> same occurs on several others!)
> 
> Good, updated the zip file, just tested on Linux here (the local
> Windows maschine just installs VS for testing), giving the following
> (correct output file format here):

Next update after clean test on another Win32 maschine: there have to
be crypt32.lib and ws2_32.lib libs linked, besides that the code is 
unchanged. As the code produces correct asn1 files on Linux (see 
previous mail), it now looks even more like a bug in the 
crypto-library on Windows...

Following output:
C:\Users\Alkes\Downloads\TestCrypt>dir
  Datenträger in Laufwerk C: ist OS
  Volumeseriennummer: 1E39-A7D1

  Verzeichnis von C:\Users\Alkes\Downloads\TestCrypt

29.03.2018  08:53    <DIR>          .
29.03.2018  08:53    <DIR>          ..
29.03.2018  08:52               877 CMakeLists.txt
29.03.2018  08:33             1.038 local.cert
29.03.2018  08:33             1.708 local.key
29.03.2018  08:33    <DIR>          src
29.03.2018  08:33    <DIR>          ssl
29.03.2018  08:33                27 testfile.txt
                4 Datei(en),          3.650 Bytes
                4 Verzeichnis(se), 276.550.766.592 Bytes frei

C:\Users\Alkes\Downloads\TestCrypt>mkdir build

C:\Users\Alkes\Downloads\TestCrypt>cd build

C:\Users\Alkes\Downloads\TestCrypt\build>cmake .. -G"NMake Makefiles"
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio
14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio
14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft 
Visual Studi
o 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft 
Visual Studi
o 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: C:/Program Files (x86)/openssl/lib/libcrypto.lib 
(found suitab
le exact version "1.1.0g")
-- Configuring done
-- Generating done
-- Build files have been written to: 
C:/Users/Alkes/Downloads/TestCrypt/build

C:\Users\Alkes\Downloads\TestCrypt\build>nmake

Microsoft (R) Program Maintenance Utility, Version 14.00.24210.0
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

         "C:\Program Files\CMake\bin\cmake.exe" 
-HC:\Users\Alkes\Downloads\TestCr
ypt -BC:\Users\Alkes\Downloads\TestCrypt\build --check-build-system 
CMakeFiles\M
akefile.cmake 0
         "C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start 
C:\Users\
Alkes\Downloads\TestCrypt\build\CMakeFiles 
C:\Users\Alkes\Downloads\TestCrypt\bu
ild\CMakeFiles\progress.marks
         "C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\BIN\nmake.exe" -
f CMakeFiles\Makefile2 /nologo -                   all
         "C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\BIN\nmake.exe" -
f CMakeFiles\TestCrypt.dir\build.make /nologo -L                  
CMakeFiles\Tes
tCrypt.dir\depend
         "C:\Program Files\CMake\bin\cmake.exe" -E cmake_depends "NMake 
Makefiles
" C:\Users\Alkes\Downloads\TestCrypt C:\Users\Alkes\Downloads\TestCrypt 
C:\Users
\Alkes\Downloads\TestCrypt\build 
C:\Users\Alkes\Downloads\TestCrypt\build C:\Use
rs\Alkes\Downloads\TestCrypt\build\CMakeFiles\TestCrypt.dir\DependInfo.cmake 
--c
olor=
Scanning dependencies of target TestCrypt
         "C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\BIN\nmake.exe" -
f CMakeFiles\TestCrypt.dir\build.make /nologo -L                  
CMakeFiles\Tes
tCrypt.dir\build
[ 50%] Building CXX object CMakeFiles/TestCrypt.dir/src/app.cpp.obj
         C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe 
@C:\Users\Alkes\AppData\Local\Temp\
nm2433.tmp
app.cpp
[100%] Linking CXX executable TestCrypt.exe
         "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe 
--intdir=CMakeFile
s\TestCrypt.dir --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe 
/nologo @
CMakeFiles\TestCrypt.dir\objects1.rsp 
@C:\Users\Alkes\AppData\Local\Temp\nm2618.
tmp
[100%] Built target TestCrypt
         "C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start 
C:\Users\
Alkes\Downloads\TestCrypt\build\CMakeFiles 0

C:\Users\Alkes\Downloads\TestCrypt\build>cp ..\testfile.txt .
Der Befehl "cp" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\Alkes\Downloads\TestCrypt\build>copy ..\testfile.txt .
         1 Datei(en) kopiert.

C:\Users\Alkes\Downloads\TestCrypt\build>copy ..\local.cert .
         1 Datei(en) kopiert.

C:\Users\Alkes\Downloads\TestCrypt\build>copy ..\local.key .
         1 Datei(en) kopiert.

C:\Users\Alkes\Downloads\TestCrypt\build>.\TestCrypt.exe

C:\Users\Alkes\Downloads\TestCrypt\build>.\TestCrypt.exe

C:\Users\Alkes\Downloads\TestCrypt\build>openssl smime -decrypt -inform 
DER -in
testfile.crypt -inkey local.key -out testfile.sig

C:\Users\Alkes\Downloads\TestCrypt\build>openssl smime -verify -inform 
DER -in t
estfile.sig -CAfile local.cert
Error reading S/MIME message
4592:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too 
long:crypt
o\asn1\asn1_lib.c:101:
4592:error:0D068066:asn1 encoding routines:asn1_check_tlen:bad object 
header:cry
pto\asn1\tasn_dec.c:1100:
4592:error:0D08303A:asn1 encoding 
routines:asn1_template_noexp_d2i:nested asn1 e
rror:crypto\asn1\tasn_dec.c:536:Field=cert, Type=PKCS7_SIGNED
4592:error:0D08303A:asn1 encoding 
routines:asn1_template_noexp_d2i:nested asn1 e
rror:crypto\asn1\tasn_dec.c:609:
4592:error:0D08403A:asn1 encoding routines:asn1_template_ex_d2i:nested 
asn1 erro
r:crypto\asn1\tasn_dec.c:460:Field=d.sign, Type=PKCS7

C:\Users\Alkes\Downloads\TestCrypt\build>

Best regards Jan

<<attachment: TestCrypt.zip>>

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux