Assured of confirmation as director of the Central Intelligence Agency after 3 1/2 hours of relaxed Senate testimony, Adm. Stansfield Turner said yesterday that he favors criminal penalties for CIA officials who violate their special oaths of secrecy.

Testifying before the Senate Intelligence Committee, Turner, 53, said he would "certainly be very amenable" to developing and advocating legislation that would make unauthorized disclosures by present and former CIA employees a crime.

The CIA has long sought what would amount to an official secrets act, but has never generated sufficient support one in light of the constitutional inhibitions of the First Amendment.

Turner was virtually invited to draft such legislation by committee Chairman Daniel K. Inouye (D-Hawaii), who voiced chagrin about the spate of books and news articles about CIA activities in recent years. He seemed to be referring in part to last week's disclosure in The Washington Post of the CIA's cash payments to Jordan's King Hussein.

Inouye siad he would make a report to the committee on the "Hussein matter" in executive session this afternoon and then convene publicly to approve Turner's nomination.

Self-assured and precise, Turner encoutered mild reservations from committee members only over his determination not to resign his Navy commission. A U.S. Naval Academy classmate of President Carter, he has been serving as commander-in-chief of allied forces in Southern Europe. He was nominated as CIA director Feb. 7.

He said he intends to resume his military career after his CIA stint, and pointed out that nine members of the military have served as either CIA director or deputy director since its establishment. Turner told reporters that he felt it would be a "subterfuge" to resign his commission temporarily. He added that his decision to remain an admiral would cost him some $17,000 a year, since resignation would entitle him to draw a pension along with his CIA salary.

Turner, who said he plans to bring four naval aides with him to help him take charge of "this maelstrom," promised "fireworks" if he should ever discovered any subordinates hiding information from him. He said he would resign his post rather than heed an order to conduct an illegal activity, and he promised to inform the Senate committee fully of CIA operations, including any improprieties that might come to light.