He didn't give up critical information. And frankly, it takes serious balls to
fucking refuse to be released from POW camp until other Americans were released first.
He'd be a shitty President, but attacking his service is a non-starter.
From wiki:
Although McCain was badly wounded, his captors refused to give him medical care unless he gave them military information; they beat and interrogated him, but McCain only offered his name, rank, serial number, and date of birth.<57> Soon thinking he was near death, McCain said he would give them more information if taken to the hospital, hoping he could then put them off once he was treated.<59> A prison doctor came and said it was too late, as McCain was about to die anyway.<57> Only when the North Vietnamese discovered that his father was a top admiral did they give him medical care<57> and announce his capture. At this point, two days after McCain's plane went down, that event and his status as a POW made the front pages of The New York Times<44> and The Washington Post.<60> Interrogation and beatings resumed in the hospital; McCain gave his ship's name, squadron's name, and the attack's intended target.<61> Further coerced to give the names of his squadron members, he supplied the names of the Green Bay Packers' offensive line.<62><61>
McCain spent six weeks in the Hoa Loa hospital, receiving marginal care.<52> He was interviewed by a French television reporter whose report was carried on CBS, and was observed by a variety of North Vietnamese, including the famous General Vo Nguyen Giap.<57> Many of the North Vietnamese observers assumed that he must be part of America's political-military-economic elite.<57> Now having lost 50 pounds, in a chest cast, and with his hair turned white,<52> McCain was sent to a prisoner-of-war camp on the outskirts of Hanoi nicknamed "the Plantation"<63> in December 1967, into a cell with two other Americans who did not expect him to live a week (one was Bud Day, a future Medal of Honor recipient); they nursed McCain and kept him alive.<64> In March 1968, McCain was put into solitary confinement, where he would remain for two years.<57> In July 1968, McCain's father was named Commander-in-Chief, Pacific Command (CINCPAC), stationed in Honolulu and commander of all U.S. forces in the Vietnam theater.<5> McCain was immediately offered a chance to return home early:<52> the North Vietnamese wanted a worldwide propaganda coup by appearing merciful, and also wanted to show other POWs that elites like McCain were willing to be treated preferentially.<57> McCain turned down the offer of repatriation, due to the Code of Conduct principle of "first in, first out": he would only accept the offer if every man taken in before him was released as well.<65> McCain's refusal to be released was even remarked upon by North Vietnamese senior negotiator Le Duc Tho to U.S. envoy Averell Harriman during the ongoing Paris Peace Talks.<66>
In August of 1968, a program of vigorous torture methods began on McCain, using rope bindings into painful positions, and beatings every two hours, at the same time as he was suffering from dysentery.<57><52> Teeth and bones were broken again, as was McCain's spirit; the beginning of a suicide attempt was stopped by guards.<52> After four days of this, McCain signed and taped<67> an anti-American propaganda "confession" that said, in part, "I am a black criminal and I have performed the deeds of an air pirate. I almost died, and the Vietnamese people saved my life, thanks to the doctors."<52> He used stilted Communist jargon and ungrammatical language to signal that the statement was forced.<62> He felt then and always that he had dishonored his country, his family, his comrades and himself by his statement,<68> but as he would later write, "I had learned what we all learned over there: Every man has his breaking point. I had reached mine."<57> His injuries to this day have left him incapable of raising his arms above his head.<14> Two weeks later his captors tried to force him to sign a second statement, and this time, his will to resist restored, he refused.<57> He received two to three beatings per week because of his continued refusal.<69> Other American POWs were similarly tortured and maltreated in order to extract "confessions",<57> with many enduring even worse treatment than McCain.<70> However, on one occasion, a guard surreptitiously loosened McCain's painful rope bindings for a night; when months later the guard later saw McCain on Christmas Day, he stood next to McCain and silently drew a cross in the dirt with his foot<71> (decades later, McCain would relate this Good Samaritan story during his presidential campaigns, as a testament to faith and humanity<72><73>). On Christmas Eve 1968, a church service for the POWs was staged for photographers and film cameras; McCain defied North Vietnamese instructions to be quiet, speaking out details of his treatment then shouting "Fu-u-u-u-ck you, you son of a bitch!" and giving the finger whenever a camera was pointed at him.<74> McCain refused to meet with various anti-war peace groups coming to Hanoi, such as those led by David Dellinger, Tom Hayden, and Rennie Davis, not wanting to give either them or the North Vietnamese a propaganda victory based on his connection to his father.<57>