microsoft / SymCrypt

Cryptographic library
MIT License
660 stars 68 forks source link

Fix ISO C/C++ violations, enable IPO / LTO / LTCG on Release #19

Closed TYoungSL closed 2 years ago

TYoungSL commented 2 years ago

make windows bits more compatible with gcc/clang to catch more problems

fix ISO C/C++ violations (const char -> char, template use before specialization, invalid string escapes, missing specialization definitions)

fix SymCryptFatalEnv* stack clash code emit failures under gcc

add IPO / LTCG support to root CMakeLists.txt (optional, disabled for Debug, opt-out for Release)

add windows (10) kits discovery to root CMakeLists.txt

TYoungSL commented 2 years ago

fyi, I'm aware;

We love to receive comments and suggestions. Unfortunately we cannot accept external code contributions at this time. Cryptographic code is considered highly sensitive by many of our large customers. We have some very big customers who put great value in the assurance of the crypto code used in their organization. By restricting the coding to a handful of employees we can greatly reduce the (perceived) risk of malicious contributions.

@samuel-lee-msft could you take a look.

mlindgren commented 2 years ago

Hi @TYoungSL, First off, thanks for your contribution. Unfortunately, as you saw in our README, we have a policy of not taking external contributions directly. This is a commitment that we’ve made to our customers due to concerns they have raised over the possibility of malicious contributions, so we can’t make exceptions to that policy.

We will evaluate your proposed changes to see if we want to make similar changes in a future update, when time allows. If we do so, we’ll be sure to credit you in a “contributors” file as the originator of these changes. That said, we are unlikely to add support for gcc/clang on Windows in the short term, because doing so would entail a maintenance cost that we’re not prepared to take on at this time.

Thanks, Mitch

TYoungSL commented 2 years ago

Yeah. Fix up the ISO C/C++ stuff, like missing template<>, use before instantiation, missing (implicit?) definitions etc. though.

No idea what IPO/LTO/LTCG will buy you though.