The Convention gives Turkey full control over the Turkish Straits and guarantees the free passage of civilian vessels in peacetime. It restricts the passage of naval ships not belonging to Black Sea states.
In the end, the British conceded some of their requests while the Soviets succeeded in ensuring that the Black Sea countries – including the USSR – were given some exemptions from the military restrictions imposed on non-Black Sea nations.
A number of highly-specific restrictions were imposed on what type of warships are allowed passage. No more than nine foreign warships, with a total aggregate tonnage of 15,000 tons, may pass at any one time, therefore a single non-Black Sea state warship passing the straits might not exceed 15,000 tons. An aggregate tonnage of all non-Black Sea warships in the Black Sea must be no more than 30,000 tons (or 45,000 tons under special conditions), and they are permitted to stay in the Black Sea for no longer than twenty-one days. Only Black Sea states may transit capital ships of any tonnage, escorted by no more than two destroyers.
Under Article 12, Black Sea states are also allowed to send submarines through the Straits, with prior notice, as long as the vessels have been constructed, purchased or sent for repair outside the Black Sea. The less restrictive rules applicable to Black Sea states were agreed as, effectively, a concession to the Soviet Union, the only Black Sea state other than Turkey with any significant number of capital ships or submarines. The passage of civil aircraft between the Mediterranean and Black Seas is permitted but only along routes authorised by the Turkish government.
End of Quotes.
If the submarine is constructed (build) outside the Black Sea it is allowed to travel trough the Straits anytime it wants.