The FBI's attempts to force Apple to unlock an iPhone used by one of the San Bernardino terrorists is not just about accessing information about the attack, but changing the architecture of the device's mobile operating system, former CIA director James Woolsey said Friday.

"The last time I looked into the language on this with some care, it did seem to me as if the FBI was trying to get a right essentially to effectively decide what kind of an operating system Apple was going to have, and that they were not just trying to get into one phone. They were trying to change some important aspect of Apple's operating system," Woolsey told CNBC's "Squawk Box."

Lawmakers and tech companies have long been at odds over the encryption being built into consumer devices.

Tech companies generally say encryption is necessary to protect their customers' privacy in a world besieged by data breaches. But national security and law enforcement officials worry it is creating a powerful tool for terrorists to communicate covertly and putting up high-tech roadblocks to investigations.