That lasted less than a week. Then a higher court overturned the lower court's ruling and the exclusive carrier chose to stop selling the unlocked version.
In France it is possible to obtain an officially unlocked version of the iPhone. You pay an extremely large amount to get it contract-free and unlocked right from the start, or alternatively you can wait six months, and the network will unlock it for free on request (although you won't be released from your contractual obligation to continue making regular monthly payments for the life of the original contract).
Apparently the iPhones for sale in Hong Kong and Australia are also available in an officially unlocked state. It may also be true in other countries too.
Certainly in the UK the exclusive carrier has said that they never intend to offer unlocking services for any of the iPhones they sell.
To answer your question:
Apple has produced official unlocking software. It is not immediately clear to me whether they always intended to have an unlockable version available, or if they were forced into it as a cost of doing business in certain jurisdictions where it was required.
However, it appears to be the case that now that we know such an official unlock does technically exist, it is up to the discretion of the carrier you purchased the phone from (along with any agreements they may have entered into with Apple, as well as the relevant laws which may trump those agreements in the jurisdiction where you live) to decide whether the official unlock will be made available in your area.