cURL and wget Issues on Ubuntu 16.04 – SSL: TLSV1_ALERT_PROTOCOL_VERSION

Monday, December 5th, 2022

cURL and wget Issues on Ubuntu 16.04

When using wget or curl to make HTTP requests from a no longer supported installation of Ubuntu 16.04 Xenial, if you get any of the following errors:

curl gnutls_handshake() failed: Error in protocol version
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version  /home/mohan/mesg
[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727) 

The solution is to add SavOS Rob Savoury PPAs to get updated curl and wget packages:

sudo add-apt-repository ppa:savoury1/build-tools
sudo add-apt-repository ppa:savoury1/backports
sudo add-apt-repository ppa:savoury1/python
sudo add-apt-repository ppa:savoury1/encryption
sudo add-apt-repository ppa:savoury1/curl34
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install wget curl python2.7

C# Binding Redirects – Finding and Detecting Assembly Version of Any DLL

Monday, November 30th, 2020

C# Binding Redirects – Finding and Detecting Assembly Version of Any DLL

When dealing with binding redirects, you may not know the newVersion value to use for a recently updated library.  The file version of the DLL is not necessarily the assembly version of the DLL, and when it comes to binding redirects, you must use the correct assembly version for a particular library. 

For example, in the web.config for one of our MVC projects we have the following:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
         <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f">
         <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2">
       </dependentAssembly>
    </assemblyBiding>
</runtime>

If we update the Antlr3.Runtime package to the latest version in the nuget package manager, our binding redirects may not be automatically updated. As such, we will have to update it manually ourselves with the correct newVersion assembly version value for the updated DLL. To find the assembly version, run this PowerShell script (updating the path to the DLL as necessary):

[Reflection.AssemblyName]::GetAssemblyName('C:\development\bin\Antlr3.Runtime.dll').Version

This is the version number that is needed for the updated binding redirect in the "newVersion" attribute.

Get the Source Code and Modify an Ubuntu Package

Tuesday, October 6th, 2015

Modifiying the Source of a Package and Creating a New Deb Binary

In order to download the source code of an existing package, first install the prerequisites:

sudo apt-get install build-essential debhelper

To get the source code of a package, run the following command:

apt-get source {name_of_package_interested_in}

Make changes to the source using an editor like geany or via terminal through nano.  Edit the changelog file and add a record of your changes to build a new revision number.  After you have made the changes, run the following commands to build the package which should include your changes.

dpkg-source --commit
dpkg-buildpackage -b

The updated package has been built.  To install the package, simply use the below commands:

sudo dpkg --install {name_of_new_deb_file}

To remove the software:

sudo dpkg -r {name_of_package [NOT NAME OF DEB FILE]}

Now you can release it!