On Thu, Sep 16, 2021 at 2:44 AM Benjamin Schäfer <skullman1...@gmail.com> wrote:
>
> Ok, at least this gives me a ray of hope. So, to get rid of any interfering 
> codelines, I did:
>
> - Start Visual Studio
> - New project (MFC Console, static linked MFC, Multibyte (unicode brings up 
> the same result)

My Windows testing looks OK to me.

I guess you are going to have to put your project somewhere we can see
it, like GitHub. I'll clone it and try to duplicate the issue.

Here's what I did for Windows testing... I add the PEM source files to
the nmake file:

$ git diff
diff --git a/cryptest.nmake b/cryptest.nmake
index 1164c25f..3e0bba0c 100644
--- a/cryptest.nmake
+++ b/cryptest.nmake
@@ -84,7 +84,8 @@ LIB_SRCS = \
     sse_simd.cpp strciphr.cpp tea.cpp tftables.cpp threefish.cpp tiger.cpp \
     tigertab.cpp ttmac.cpp tweetnacl.cpp twofish.cpp vmac.cpp wake.cpp \
     whrlpool.cpp xed25519.cpp xtr.cpp xtrcrypt.cpp xts.cpp zdeflate.cpp \
-    zinflate.cpp zlib.cpp
+    zinflate.cpp zlib.cpp \
+    pem_common.cpp pem_read.cpp pem_write.cpp x509cert.cpp

 LIB_OBJS = \
     cryptlib.obj cpu.obj integer.obj 3way.obj adler32.obj algebra.obj \
@@ -115,7 +116,8 @@ LIB_OBJS = \
     sse_simd.obj strciphr.obj tea.obj tftables.obj threefish.obj tiger.obj \
     tigertab.obj ttmac.obj tweetnacl.obj twofish.obj vmac.obj wake.obj \
     whrlpool.obj xed25519.obj xtr.obj xtrcrypt.obj xts.obj zdeflate.obj \
-    zinflate.obj zlib.obj
+    zinflate.obj zlib.obj \
+    pem_common.obj pem_read.obj pem_write.obj x509cert.obj

 ASM_OBJS = \
     rdrand-x86.obj rdrand-x64.obj rdseed-x86.obj rdseed-x64.obj
x64masm.obj x64dll.obj

Then, from a Developer Prompt, build the library:

>nmake /f cryptest.nmake
...

Build the test program test.cxx:

cl.exe /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc
/DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /FI winapifamily.h
/c test.cxx /out:test_pem.obj

Link the test program:

link.exe /nologo /SUBSYSTEM:CONSOLE /DEBUG /DEBUG /OPT:REF
/MACHINE:X64 test_pem.obj cryptlib.lib kernel32.lib /out:test_pem.exe

Run the test program:

C:\Users\Jeff\Desktop\cryptopp>.\test_pem.exe

And dump the contents for the PEM file:

C:\Users\Jeff\Desktop\cryptopp>type pubkey.pem
-----BEGIN PUBLIC KEY-----
MFowFAYHKoZIzj0CAQYJKyQDAwIIAQEHA0IABEC6Sfy6RcfusiYbG+Drx8FNZIS5
74ojsGDr5n+XJSu8mHuknfNkoMmSbytt4br0YGihOixcmBKy80UfSLdXGe4=
-----END PUBLIC KEY-----

I used Visual Studio 2017 Command Line Tools (CLT). But just about any
modern version of Visual Studio should produce the same results. In
fact, I use cryptest.nmake to test back to Visual Studio 2003.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8%3DdhJa8PMUNdcUSVmZVmYs%2BFmbm1UFRbJhhNK%3DL%3D_c-0Q%40mail.gmail.com.

Reply via email to