christianspecht / bitbucket-backup

A backup tool which clones all your Bitbucket repositories to your local machine.
https://christianspecht.de/bitbucket-backup/
Other
0 stars 2 forks source link

TLS v1.2 must be forced #41

Open christianspecht opened 5 years ago

christianspecht commented 5 years ago

Original report by Jan Krivanek.


Bitbucket deprecated support of TLS v 1.0 and 1.1 - so v 1.2 must be forced I have a fix, but the repo doesn't allow creation of branches and pull requests

christianspecht commented 5 years ago

Original comment by Jan Krivanek.


To fix add the following lines somewhere before any Bitbucket API is called (e.g. into Program.cs):

#!c#

//We need to force TLS v1.2 usage as older are deprecated - https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01
//This would require .net framework targetting update
//System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; //TLS 1.2