Gen Fonseka has been detained since January
Sri Lanka's ex-chief justice has criticised plans to put the former presidential candidate, General Sarath Fonseka, on military trial.
Sarath Silva, who retired in June and has since come out as a supporter of Gen Fonseka, said his imminent court martial was unconstitutional.
He said it should not be held as Gen Fonseka, in his view, was not subject to military law.
Gen Fonseka faces charges of mixing politics with his military career.
He also faces charges of acting improperly in awarding military procurement contracts.
His court martial is due to begin on Tuesday. He denies any wrongdoing.
Sri Lankan authorities have repeatedly insisted that their treatment of Gen Fonseka has been acceptable.
But Mr Silva said the manner of his detention breached United Nations rights conventions which are written into Sri Lanka's constitution.
"There is no democratic system here because there is no room for dissent, there is no room for freedom of expression, those freedoms are not there," Mr Silva said.
"Those are very valued things."
Gen Fonseka's daughter, Apsara, has accused the government of trying the retired general in order to remove him from next month's parliamentary election, in which he intends to stand.
The BBC tried to contact six senior government figures for a response to her allegations, but none was available for comment.
Gen Fonseka lost to President Mahinda Rajapakse at January's elections.
Ahead of the court martial, Gen Fonseka's Democratic National Alliance party has said he will not co-operate with the closed-door proceedings at naval headquarters in the capital, AFP news agency reported.
Demonstrations against his arrest and court martial have been held in Colombo.