Commit dce2040786c63aa0bb53c0736b852f6bc8dc42b6
1 parent
328fe9af
Exists in
master
and in
3 other branches
Merging changes from UbuntuVM and WindowsVM
Showing
3 changed files
with
125 additions
and
112 deletions
Show diff stats
src/ssl/negotiate.c
| ... | ... | @@ -201,8 +201,14 @@ static int background_ssl_negotiation(H3270 *hSession, void *message) |
| 201 | 201 | if( (protocol = get_protocol_from_id(hSession->ssl.protocol.min_version)) != NULL ) |
| 202 | 202 | { |
| 203 | 203 | #if (OPENSSL_VERSION_NUMBER >= 0x1010009fL) |
| 204 | - trace_ssl(hSession,"Minimum protocol version set to %s\n",protocol->description); | |
| 205 | - SSL_set_min_proto_version(hSession->ssl.con,protocol->id); | |
| 204 | + if(SSL_set_min_proto_version(hSession->ssl.con,protocol->id) == 1) | |
| 205 | + { | |
| 206 | + trace_ssl(hSession,"Minimum protocol version set to %s\n",protocol->description); | |
| 207 | + } | |
| 208 | + else | |
| 209 | + { | |
| 210 | + lib3270_write_log(hSession,"ssl","Can't set minimum protocol version to %s",protocol->description); | |
| 211 | + } | |
| 206 | 212 | #else |
| 207 | 213 | trace_ssl(hSession,"Can't set minimum protocol version to %s\n",protocol->description); |
| 208 | 214 | #endif // OPENSSL_VERSION_NUMBER |
| ... | ... | @@ -211,8 +217,14 @@ static int background_ssl_negotiation(H3270 *hSession, void *message) |
| 211 | 217 | if( (protocol = get_protocol_from_id(hSession->ssl.protocol.max_version)) != NULL ) |
| 212 | 218 | { |
| 213 | 219 | #if (OPENSSL_VERSION_NUMBER >= 0x1010009fL) |
| 214 | - trace_ssl(hSession,"Maximum protocol version set to %s\n",protocol->description); | |
| 215 | - SSL_set_max_proto_version(hSession->ssl.con,protocol->id); | |
| 220 | + if(SSL_set_max_proto_version(hSession->ssl.con,protocol->id) == 1) | |
| 221 | + { | |
| 222 | + trace_ssl(hSession,"Maximum protocol version set to %s\n",protocol->description); | |
| 223 | + } | |
| 224 | + else | |
| 225 | + { | |
| 226 | + lib3270_write_log(hSession,"ssl","Can't set maximum protocol version to %s",protocol->description); | |
| 227 | + } | |
| 216 | 228 | #else |
| 217 | 229 | trace_ssl(hSession,"Can't set maximum protocol version to %s\n",protocol->description); |
| 218 | 230 | #endif // OPENSSL_VERSION_NUMBER | ... | ... |
win/x86_32/mingw32-lib3270.spec
| 1 | 1 | # |
| 2 | -# spec file for package mingw32-lib3270 | |
| 2 | +# spec file for package mingw32-%{_libname} | |
| 3 | 3 | # |
| 4 | -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. | |
| 4 | +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. | |
| 5 | 5 | # Copyright (C) <2008> <Banco do Brasil S.A.> |
| 6 | 6 | # |
| 7 | 7 | # All modifications and additions to the file contributed by third parties |
| ... | ... | @@ -16,6 +16,9 @@ |
| 16 | 16 | # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
| 17 | 17 | # |
| 18 | 18 | |
| 19 | +%define _libname lib3270 | |
| 20 | +%define _product pw3270 | |
| 21 | + | |
| 19 | 22 | %define __strip %{_mingw32_strip} |
| 20 | 23 | %define __objdump %{_mingw32_objdump} |
| 21 | 24 | %define _use_internal_dependency_generator 0 |
| ... | ... | @@ -23,32 +26,27 @@ |
| 23 | 26 | %define __find_provides %{_mingw32_findprovides} |
| 24 | 27 | %define __os_install_post %{_mingw32_debug_install_post} \ |
| 25 | 28 | %{_mingw32_install_post} |
| 29 | + | |
| 30 | +#---[ Package header ]------------------------------------------------------------------------------------------------ | |
| 26 | 31 | |
| 27 | -#---[ Main package ]-------------------------------------------------------------------------------------------------- | |
| 28 | - | |
| 29 | -Summary: TN3270 Access library | |
| 30 | -Name: mingw32-lib3270 | |
| 32 | +Summary: TN3270 access library for 32 bits Windows | |
| 33 | +Name: mingw32-%{_libname} | |
| 31 | 34 | Version: 5.2 |
| 32 | - | |
| 33 | -%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) | |
| 34 | -%define MINOR_VERSION %(echo %{version} | cut -d. -f2) | |
| 35 | -%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} | |
| 36 | - | |
| 37 | 35 | Release: 0 |
| 38 | -License: GPL-2.0 | |
| 36 | +License: LGPL-3.0 | |
| 39 | 37 | |
| 40 | 38 | Source: lib3270-%{version}.tar.xz |
| 41 | 39 | |
| 42 | -Url: https://portal.softwarepublico.gov.br/social/pw3270/ | |
| 40 | +URL: https://github.com/PerryWerneck/lib3270 | |
| 43 | 41 | |
| 44 | -Group: Development/Libraries/C and C++ | |
| 42 | +Group: System/Libraries | |
| 45 | 43 | BuildRoot: /var/tmp/%{name}-%{version} |
| 46 | 44 | |
| 47 | -Provides: mingw32(lib:3270) = %{version} | |
| 48 | - | |
| 49 | -BuildRequires: autoconf | |
| 45 | +BuildRequires: autoconf >= 2.61 | |
| 50 | 46 | BuildRequires: automake |
| 51 | -BuildRequires: gettext-tools | |
| 47 | +BuildRequires: gettext-devel | |
| 48 | +BuildRequires: xz | |
| 49 | +BuildRequires: fdupes | |
| 52 | 50 | |
| 53 | 51 | BuildRequires: mingw32-cross-binutils |
| 54 | 52 | BuildRequires: mingw32-cross-gcc |
| ... | ... | @@ -61,77 +59,82 @@ BuildRequires: mingw32(lib:iconv) |
| 61 | 59 | BuildRequires: mingw32(lib:intl) |
| 62 | 60 | |
| 63 | 61 | %description |
| 62 | +TN3270 access library, originally designed as part of the %{_product} application. | |
| 64 | 63 | |
| 65 | -TN3270 access library originally designed as part of the pw3270 application. | |
| 64 | +For more details, see https://softwarepublico.gov.br/social/pw3270/ . | |
| 66 | 65 | |
| 67 | -See more details at https://softwarepublico.gov.br/social/pw3270/ | |
| 66 | +#---[ Library ]------------------------------------------------------------------------------------------------------- | |
| 68 | 67 | |
| 69 | -#---[ Development ]--------------------------------------------------------------------------------------------------- | |
| 68 | +%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) | |
| 69 | +%define MINOR_VERSION %(echo %{version} | cut -d. -f2) | |
| 70 | +%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} | |
| 70 | 71 | |
| 71 | -%package devel | |
| 72 | +%package -n %{name}-%{_libvrs} | |
| 73 | +Summary: TN3270 Access library | |
| 74 | +Group: Development/Libraries/C and C++ | |
| 72 | 75 | |
| 73 | -Summary: TN3270 Access library development files | |
| 74 | -Group: Development/Libraries/C and C++ | |
| 75 | -Requires: %{name} = %{version} | |
| 76 | +%description -n %{name}-%{_libvrs} | |
| 77 | +TN3270 access library, originally designed as part of the %{_product} application. | |
| 76 | 78 | |
| 77 | -%description devel | |
| 79 | +For more details, see https://softwarepublico.gov.br/social/pw3270/ . | |
| 78 | 80 | |
| 79 | -TN3270 access library for C development files. | |
| 81 | +%package devel | |
| 80 | 82 | |
| 81 | -Originally designed as part of the pw3270 application. | |
| 83 | +Summary: TN3270 Access library development files | |
| 84 | +Group: Development/Libraries/C and C++ | |
| 85 | +Requires: %{name}-%{_libvrs} = %{version} | |
| 82 | 86 | |
| 83 | -See more details at https://softwarepublico.gov.br/social/pw3270/ | |
| 87 | +%description devel | |
| 88 | +Header files for the TN3270 access library. | |
| 84 | 89 | |
| 85 | 90 | #---[ Build & Install ]----------------------------------------------------------------------------------------------- |
| 86 | 91 | |
| 87 | 92 | %prep |
| 88 | 93 | %setup -n lib3270-%{version} |
| 89 | 94 | |
| 90 | -NOCONFIGURE=1 ./autogen.sh | |
| 95 | +NOCONFIGURE=1 \ | |
| 96 | + ./autogen.sh | |
| 91 | 97 | |
| 92 | 98 | %{_mingw32_configure} |
| 93 | 99 | |
| 94 | 100 | %build |
| 95 | -make clean | |
| 96 | -make all | |
| 101 | +make all %{?_smp_mflags} | |
| 97 | 102 | |
| 98 | 103 | %{_mingw32_strip} \ |
| 99 | 104 | --strip-all \ |
| 100 | 105 | .bin/Release/*.dll |
| 101 | 106 | |
| 107 | + | |
| 102 | 108 | %install |
| 103 | 109 | %{_mingw32_makeinstall} |
| 110 | +%_mingw32_find_lang %{_libname} langfiles | |
| 111 | +%fdupes %{buildroot} | |
| 104 | 112 | |
| 105 | -%clean | |
| 106 | -rm -rf %{buildroot} | |
| 107 | - | |
| 108 | -#---[ Files ]--------------------------------------------------------------------------------------------------------- | |
| 109 | - | |
| 110 | -%files | |
| 113 | +%files -n %{name}-%{_libvrs} -f langfiles | |
| 111 | 114 | %defattr(-,root,root) |
| 112 | -%doc AUTHORS LICENSE README.md | |
| 113 | 115 | |
| 114 | -%{_mingw32_libdir}/lib3270.dll | |
| 115 | -%{_mingw32_libdir}/lib3270.dll.%{MAJOR_VERSION} | |
| 116 | -%{_mingw32_libdir}/lib3270.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} | |
| 116 | +%doc AUTHORS README.md | |
| 117 | +%license LICENSE | |
| 117 | 118 | |
| 118 | -%dir %{_mingw32_datadir}/pw3270 | |
| 119 | +%dir %{_mingw32_datadir}/%{_product} | |
| 120 | + | |
| 121 | +%{_mingw32_bindir}/*.dll | |
| 119 | 122 | |
| 120 | 123 | %files devel |
| 121 | 124 | %defattr(-,root,root) |
| 122 | 125 | |
| 123 | -%{_mingw32_includedir}/lib3270 | |
| 126 | +%{_mingw32_libdir}/*.a | |
| 124 | 127 | |
| 125 | 128 | %{_mingw32_includedir}/*.h |
| 129 | +%{_mingw32_includedir}/lib3270 | |
| 130 | + | |
| 126 | 131 | %{_mingw32_libdir}/pkgconfig/*.pc |
| 127 | -%{_mingw32_libdir}/*.a | |
| 128 | -%{_mingw32_libdir}/*.lib | |
| 129 | 132 | |
| 130 | -%dir %{_mingw32_datadir}/pw3270/def | |
| 131 | -%{_mingw32_datadir}/pw3270/def/*.def | |
| 133 | +%dir %{_mingw32_datadir}/%{_product}/def | |
| 134 | +%{_mingw32_datadir}/%{_product}/def/*.def | |
| 135 | +%{_mingw32_datadir}/%{_product}/def/*.mak | |
| 132 | 136 | |
| 133 | -%dir %{_mingw32_datadir}/pw3270/pot | |
| 134 | -%{_mingw32_datadir}/pw3270/pot/*.pot | |
| 137 | +%dir %{_mingw32_datadir}/%{_product}/pot | |
| 138 | +%{_mingw32_datadir}/%{_product}/pot/*.pot | |
| 135 | 139 | |
| 136 | 140 | %changelog |
| 137 | - | ... | ... |
win/x86_64/mingw64-lib3270.spec
| 1 | 1 | # |
| 2 | -# spec file for package mingw64-lib3279 | |
| 2 | +# spec file for package mingw64-%{_libname} | |
| 3 | 3 | # |
| 4 | -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. | |
| 4 | +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. | |
| 5 | 5 | # Copyright (C) <2008> <Banco do Brasil S.A.> |
| 6 | 6 | # |
| 7 | 7 | # All modifications and additions to the file contributed by third parties |
| ... | ... | @@ -16,6 +16,9 @@ |
| 16 | 16 | # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
| 17 | 17 | # |
| 18 | 18 | |
| 19 | +%define _libname lib3270 | |
| 20 | +%define _product pw3270 | |
| 21 | + | |
| 19 | 22 | %define __strip %{_mingw64_strip} |
| 20 | 23 | %define __objdump %{_mingw64_objdump} |
| 21 | 24 | %define _use_internal_dependency_generator 0 |
| ... | ... | @@ -23,34 +26,27 @@ |
| 23 | 26 | %define __find_provides %{_mingw64_findprovides} |
| 24 | 27 | %define __os_install_post %{_mingw64_debug_install_post} \ |
| 25 | 28 | %{_mingw64_install_post} |
| 29 | + | |
| 30 | +#---[ Package header ]------------------------------------------------------------------------------------------------ | |
| 26 | 31 | |
| 27 | -#---[ Main package ]-------------------------------------------------------------------------------------------------- | |
| 28 | - | |
| 29 | -Summary: TN3270 Access library | |
| 30 | -Name: mingw64-lib3270 | |
| 32 | +Summary: TN3270 access library for 64 bits Windows | |
| 33 | +Name: mingw64-%{_libname} | |
| 31 | 34 | Version: 5.2 |
| 32 | - | |
| 33 | -%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) | |
| 34 | -%define MINOR_VERSION %(echo %{version} | cut -d. -f2) | |
| 35 | -%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} | |
| 36 | - | |
| 37 | - | |
| 38 | 35 | Release: 0 |
| 39 | -License: GPL-2.0 | |
| 36 | +License: LGPL-3.0 | |
| 40 | 37 | |
| 41 | 38 | Source: lib3270-%{version}.tar.xz |
| 42 | 39 | |
| 43 | -Url: https://portal.softwarepublico.gov.br/social/pw3270/ | |
| 40 | +URL: https://github.com/PerryWerneck/lib3270 | |
| 44 | 41 | |
| 45 | -Group: Development/Libraries/C and C++ | |
| 42 | +Group: System/Libraries | |
| 46 | 43 | BuildRoot: /var/tmp/%{name}-%{version} |
| 47 | 44 | |
| 48 | -Provides: mingw64(lib:3270) = %{version} | |
| 49 | -Provides: mingw64(lib:3270-%{_libvrs}) = %{version} | |
| 50 | - | |
| 51 | -BuildRequires: autoconf | |
| 45 | +BuildRequires: autoconf >= 2.61 | |
| 52 | 46 | BuildRequires: automake |
| 53 | -BuildRequires: gettext-tools | |
| 47 | +BuildRequires: gettext-devel | |
| 48 | +BuildRequires: xz | |
| 49 | +BuildRequires: fdupes | |
| 54 | 50 | |
| 55 | 51 | BuildRequires: mingw64-cross-binutils |
| 56 | 52 | BuildRequires: mingw64-cross-gcc |
| ... | ... | @@ -63,80 +59,82 @@ BuildRequires: mingw64(lib:iconv) |
| 63 | 59 | BuildRequires: mingw64(lib:intl) |
| 64 | 60 | |
| 65 | 61 | %description |
| 62 | +TN3270 access library, originally designed as part of the %{_product} application. | |
| 66 | 63 | |
| 67 | -TN3270 access library originally designed as part of the pw3270 application. | |
| 68 | - | |
| 69 | -See more details at https://softwarepublico.gov.br/social/pw3270/ | |
| 64 | +For more details, see https://softwarepublico.gov.br/social/pw3270/ . | |
| 70 | 65 | |
| 71 | -#---[ Development ]--------------------------------------------------------------------------------------------------- | |
| 66 | +#---[ Library ]------------------------------------------------------------------------------------------------------- | |
| 72 | 67 | |
| 73 | -%package devel | |
| 68 | +%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) | |
| 69 | +%define MINOR_VERSION %(echo %{version} | cut -d. -f2) | |
| 70 | +%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} | |
| 74 | 71 | |
| 75 | -Summary: TN3270 Access library development files | |
| 76 | -Group: Development/Libraries/C and C++ | |
| 77 | -Requires: %{name} = %{version} | |
| 72 | +%package -n %{name}-%{_libvrs} | |
| 73 | +Summary: TN3270 Access library | |
| 74 | +Group: Development/Libraries/C and C++ | |
| 78 | 75 | |
| 79 | -Provides: mingw64-lib3270-devel = %{version} | |
| 80 | -Conflicts: otherproviders(mingw64-lib3270-devel) | |
| 76 | +%description -n %{name}-%{_libvrs} | |
| 77 | +TN3270 access library, originally designed as part of the %{_product} application. | |
| 81 | 78 | |
| 82 | -%description devel | |
| 79 | +For more details, see https://softwarepublico.gov.br/social/pw3270/ . | |
| 83 | 80 | |
| 84 | -TN3270 access library for C development files. | |
| 81 | +%package devel | |
| 85 | 82 | |
| 86 | -Originally designed as part of the pw3270 application. | |
| 83 | +Summary: TN3270 Access library development files | |
| 84 | +Group: Development/Libraries/C and C++ | |
| 85 | +Requires: %{name}-%{_libvrs} = %{version} | |
| 87 | 86 | |
| 88 | -See more details at https://softwarepublico.gov.br/social/pw3270/ | |
| 87 | +%description devel | |
| 88 | +Header files for the TN3270 access library. | |
| 89 | 89 | |
| 90 | 90 | #---[ Build & Install ]----------------------------------------------------------------------------------------------- |
| 91 | 91 | |
| 92 | 92 | %prep |
| 93 | 93 | %setup -n lib3270-%{version} |
| 94 | 94 | |
| 95 | -NOCONFIGURE=1 ./autogen.sh | |
| 95 | +NOCONFIGURE=1 \ | |
| 96 | + ./autogen.sh | |
| 96 | 97 | |
| 97 | -%{_mingw64_configure} \ | |
| 98 | - --with-sdk-version=%{version} | |
| 98 | +%{_mingw64_configure} | |
| 99 | 99 | |
| 100 | 100 | %build |
| 101 | -make clean | |
| 102 | -make all | |
| 101 | +make all %{?_smp_mflags} | |
| 103 | 102 | |
| 104 | 103 | %{_mingw64_strip} \ |
| 105 | 104 | --strip-all \ |
| 106 | 105 | .bin/Release/*.dll |
| 107 | 106 | |
| 107 | + | |
| 108 | 108 | %install |
| 109 | 109 | %{_mingw64_makeinstall} |
| 110 | +%_mingw64_find_lang %{_libname} langfiles | |
| 111 | +%fdupes %{buildroot} | |
| 110 | 112 | |
| 111 | -%clean | |
| 112 | -rm -rf %{buildroot} | |
| 113 | - | |
| 114 | -#---[ Files ]--------------------------------------------------------------------------------------------------------- | |
| 115 | - | |
| 116 | -%files | |
| 113 | +%files -n %{name}-%{_libvrs} -f langfiles | |
| 117 | 114 | %defattr(-,root,root) |
| 118 | -%doc AUTHORS LICENSE README.md | |
| 119 | 115 | |
| 120 | -%{_mingw64_libdir}/lib3270.dll | |
| 121 | -%{_mingw64_libdir}/lib3270.dll.%{MAJOR_VERSION} | |
| 122 | -%{_mingw64_libdir}/lib3270.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} | |
| 116 | +%doc AUTHORS README.md | |
| 117 | +%license LICENSE | |
| 118 | + | |
| 119 | +%dir %{_mingw64_datadir}/%{_product} | |
| 123 | 120 | |
| 124 | -%dir %{_mingw64_datadir}/pw3270 | |
| 121 | +%{_mingw64_bindir}/*.dll | |
| 125 | 122 | |
| 126 | 123 | %files devel |
| 127 | 124 | %defattr(-,root,root) |
| 128 | 125 | |
| 129 | -%{_mingw64_includedir}/lib3270 | |
| 126 | +%{_mingw64_libdir}/*.a | |
| 130 | 127 | |
| 131 | 128 | %{_mingw64_includedir}/*.h |
| 129 | +%{_mingw64_includedir}/lib3270 | |
| 130 | + | |
| 132 | 131 | %{_mingw64_libdir}/pkgconfig/*.pc |
| 133 | -%{_mingw64_libdir}/*.a | |
| 134 | -%{_mingw64_libdir}/*.lib | |
| 135 | 132 | |
| 136 | -%dir %{_mingw64_datadir}/pw3270/def | |
| 137 | -%{_mingw64_datadir}/pw3270/def/*.def | |
| 133 | +%dir %{_mingw64_datadir}/%{_product}/def | |
| 134 | +%{_mingw64_datadir}/%{_product}/def/*.def | |
| 135 | +%{_mingw64_datadir}/%{_product}/def/*.mak | |
| 138 | 136 | |
| 139 | -%dir %{_mingw64_datadir}/pw3270/pot | |
| 140 | -%{_mingw64_datadir}/pw3270/pot/*.pot | |
| 137 | +%dir %{_mingw64_datadir}/%{_product}/pot | |
| 138 | +%{_mingw64_datadir}/%{_product}/pot/*.pot | |
| 141 | 139 | |
| 142 | 140 | %changelog | ... | ... |