Comments (6)
we should support openssl 0.9.8 to 1.1.0, and libressl
from re.
Thanks for the quick reply. I think it would make sense adding this information to https://github.com/creytiv/re/blob/master/docs/README
from re.
As a follow-up question: Would you guys prefer OpenSSL version checks or is checking that a functions is defined fine for you as well? For example:
#if defined(SSL_CTX_set_ecdh_auto)
...
#else
...
#endif
or
#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
...
#else
...
#endif
The reason why I'm asking is that I'm not sure if libressl mimics the OPENSSL_VERSION_NUMBER. And furthermore, it seems much easier to just check if the function is defined.
Move along, nothing to see here! 😰
from re.
I am not a project member, so take my word with some grain of salt, but:
- Macro tests should be preferred over version checks, whenever available. Who knows what modifications people/distributions may apply to their OpenSSL packages? Some may even specifically mock OpenSSL versions for some arcane reasons.
- Preprocessor does not see function definitions, so test
#if defined(function)
should always evaluate to false. Try the following to see for yourself:
cat > t.c << EOF
#include <stdio.h>
int
main(void)
{
printf("#ifdef printf: ");
#ifdef printf
printf("true\n");
#else
printf("false\n");
#endif
printf("#if defined(printf): ");
#if defined(printf)
printf("true\n");
#else
printf("false\n");
#endif
return 0;
}
EOF
cc -o t t.c
./t
from re.
Oh, you're right... I'm a bit embarrassed about that. The check above only works because SSL_CTX_set_ecdh_auto
is indeed a macro, at least in OpenSSL. If I understand you correctly, checking for existence would normally be done during configuration which re doesn't have... so, although I agree with you on your first point... back to version checking for now?
from re.
can we close this now?
if a macro is available to show if a feature is present or not, it is good to use it.
otherwise using a version check is fine too.
from re.
Related Issues (20)
- Some example about JSON may mislead in retest HOT 1
- DNS client only queries first server (in most cases) HOT 5
- add RFC 6062 HOT 2
- accept 401 to re-REGISTER without WWW-Authenticate stale=true HOT 7
- Use database insted of File
- DNS resolution does not respect local configuration (/etc/hosts, avahi *.local, nsswitch.conf, etc) HOT 1
- Is there any demo for ICE ? HOT 1
- Can't Build on Docker from source HOT 2
- Can I use libre and librem in windows applications? How to compile as dll? HOT 7
- Via header address is set before TCP connection is established
- How to use rtmp_send_video to publish H264 frame?
- Issue with RTP Video over Network
- Upstream .so name versioning?
- Compilation with musl-libc fails
- libre can work based on the thirdpary Lwip?
- SIGABRT after tcp_close_handler derefs conn one too many times (race condition on socket close) HOT 2
- auth won't work for binary passwords containing zero byte characters
- config with sip device
- Shani gujjar
- WEB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re.