Experience letter from my previous employer

Dear Sir, My previous employer is blocking my experience letter of 2.3 years. There was section with an agreement mentioned in my offer letter of previous which state that I wont be able to work for the same client via different vendor post my release from the company for an year. However, I joined different company which too is working for the client, which is client for my previous employer too. I had joined new company to work for a different client, but because of my release letter was not provided by previous employer, they couldn't proceed me for further enrollment of that project. Hence, ultimately I had to work for previous client for which I was working in previous company. When I stated this problem to my previous employer they ask me to resign from the company and they will release my experience letter. Now, I have resigned from the current company also but they are still denying to release my experience letter. How much is this legal and is there a way to get my expereince letter? One more point, the agreement nowhere states that they can block my experience letter in breach of the agreement. Thank you in advance!