|
Lines 33-42
Link Here
|
| 33 |
|
33 |
|
| 34 |
/* |
34 |
/* |
| 35 |
* OpenSSL version numbers: MNNFFPPS: major minor fix patch status |
35 |
* OpenSSL version numbers: MNNFFPPS: major minor fix patch status |
| 36 |
* We match major, minor, fix and status (not patch) for <1.0.0. |
36 |
* Versions >=3 require only major versions to match. |
| 37 |
* After that, we acceptable compatible fix versions (so we |
37 |
* For versions <3, we accept compatible fix versions (so we allow 1.0.1 |
| 38 |
* allow 1.0.1 to work with 1.0.0). Going backwards is only allowed |
38 |
* to work with 1.0.0). Going backwards is only allowed within a patch series. |
| 39 |
* within a patch series. |
39 |
* See https://www.openssl.org/policies/releasestrat.html |
| 40 |
*/ |
40 |
*/ |
| 41 |
|
41 |
|
| 42 |
int |
42 |
int |
|
Lines 48-62
ssh_compatible_openssl(long headerver, long libver)
Link Here
|
| 48 |
if (headerver == libver) |
48 |
if (headerver == libver) |
| 49 |
return 1; |
49 |
return 1; |
| 50 |
|
50 |
|
| 51 |
/* for versions < 1.0.0, major,minor,fix,status must match */ |
51 |
/* |
| 52 |
if (headerver < 0x1000000f) { |
52 |
* For versions >= 3.0, only the major and status must match. |
| 53 |
mask = 0xfffff00fL; /* major,minor,fix,status */ |
53 |
*/ |
|
|
54 |
if (headerver >= 0x3000000f) { |
| 55 |
mask = 0xf000000fL; /* major,status */ |
| 54 |
return (headerver & mask) == (libver & mask); |
56 |
return (headerver & mask) == (libver & mask); |
| 55 |
} |
57 |
} |
| 56 |
|
58 |
|
| 57 |
/* |
59 |
/* |
| 58 |
* For versions >= 1.0.0, major,minor,status must match and library |
60 |
* For versions >= 1.0.0, but <3, major,minor,status must match and |
| 59 |
* fix version must be equal to or newer than the header. |
61 |
* library fix version must be equal to or newer than the header. |
| 60 |
*/ |
62 |
*/ |
| 61 |
mask = 0xfff0000fL; /* major,minor,status */ |
63 |
mask = 0xfff0000fL; /* major,minor,status */ |
| 62 |
hfix = (headerver & 0x000ff000) >> 12; |
64 |
hfix = (headerver & 0x000ff000) >> 12; |