Comments (4)
True. IIRC the results vary over other OSes as well, which is why LibreSSL portable does not enable this test by default. I've thought about including the OpenBSD inet_pton in the compat layer for the sake of consistency.
from openbsd.
biotest results of other platforms, here.
I built biotest by ./configure --enable-extratests
.
- HP-UX 11i (both gcc and C/aC++)
FAIL: test 2 ("1") success, want failure
FAIL: test 3 ("1.2") success, want failure
FAIL: test 4 ("1.2.3") success, want failure
FAIL: test 11 ("imaps") failure, want success
FAIL biotest (exit status: 1) - CentOS7
FAIL: test 2 ("1") success, want failure
FAIL: test 3 ("1.2") success, want failure
FAIL: test 4 ("1.2.3") success, want failure
FAIL: test 1 ("") success, want failure
FAIL biotest (exit status: 1) - Solaris 11.2 i386
FAIL: test 2 ("1") success, want failure
FAIL: test 3 ("1.2") success, want failure
FAIL: test 4 ("1.2.3") success, want failure
FAIL: test 13 ("0xff.0xff.0xff.0xff") success, want failure
FAIL: test 1 ("") success, want failure
FAIL: test 11 ("imaps") failure, want success - Cygwin64
FAIL: test 0 ("") success, want failure
FAIL: test 1 ("") success, want failure
FAIL biotest.exe (exit status: 1) - MinGW64
FAIL: test 11 ("localhost") failure, want success
FAIL: test 11 ("imaps") failure, want success
from openbsd.
The difference between OpenBSD's and FreeBSD's inet_pton4 is very small and both descend from isc/Paul Vixie's code.
POSIX states that the test should fail when there's fewer or more than 4 octets in the input and FreeBSD code indicates this behaviour as well.
The inet_pton() function does not accept other formats (such as the octal numbers, hexadecimal numbers, and fewer than four numbers...
@@ -92,16 +84,14 @@
if ((pch = strchr(digits, ch)) != NULL) {
u_int new = *tp * 10 + (pch - digits);
- if (saw_digit && *tp == 0)
- return (0);
if (new > 255)
return (0);
- *tp = new;
- if (!saw_digit) {
+ if (! saw_digit) {
if (++octets > 4)
return (0);
saw_digit = 1;
}
+ *tp = new;
} else if (ch == '.' && saw_digit) {
if (octets == 4)
return (0);
from openbsd.
In a nutshell, the test requires a posix compliant inet_pton(). We will simply disable
the test on systems that do not have this.
from openbsd.
Related Issues (20)
- Is libressl compatible with Linux? HOT 2
- curl-7.73.0 w/ libressl-3.2.2 leaks memory HOT 11
- tls_keypair_load_cert() fail but return no error HOT 2
- SSL_CTX_{g,s}et_security_level HOT 3
- Any possibility of creating a ruby gem for this project? HOT 1
- Inconsistent cert verification errors returned between TLS 1.2 and 1.3 HOT 6
- License information not available HOT 1
- one bug
- stack-buffer-overflow in function x509_constraints_parse_mailbox HOT 2
- TLS 1.3 decrypting support
- SIGSEGV occurred in EVP_MD_CTX_cleanup() immediately after malloc() returned NULL in pkey_hmac_init(). HOT 3
- Missing DSA_meth_set1_name HOT 2
- URI Checks are too strict in subject alt name HOT 2
- netcat may read from invalid file descriptors
- libtls: make the TLS_EOF_NO_CLOSE_NOTIFY bit user-visible
- stack-buffer-overflow(max 5byte) in print_bin() when indent is specified as 124 or more
- SIGSEGV occurs if memory allocation fails in ssl3_setup_init_buffer() called by tls13_use_legacy_stack() when downgrading from TLS1.3. HOT 4
- SSL_get{_peer,}_signature_type_nid implemented but not exported HOT 1
- Compat: Ability to compile without IPv6 support HOT 2
- EVP_get_cipherbynid/EVP_get_digestbynid when given an invalid ID/EVP_get_digestbyname segfaults with NULL argument HOT 4
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 openbsd.