Bosnian is the national origin of anybody who has a Bosnian heritage and was born in Bosnia, not mattering what religion they are(unless of course they do not see themselves as Bosnian like most catholics and orthodox christians there, but not all).
For the record somebody from Hercegovina is also a Bosnian because Hercegovina was never a independent region, but a region in Bosnia. It only received the name Hercegovina (after Hrzeg Stjepan who was a warlord in the Hum region today Herzegovina)long after being a Bosnian territory. Even during the Ottoman time Herzegovina was a territory in Bosnia( a sandzak in the Bosnian Pashadom) and the name Bosnia and Herzegovina came only to be during the creation of Yugoslavia(due to political reasons).
Name for slavic muslims. Bosniak is derived from the name Bosnia (because most slavic muslims originate from Bosnia). The term Bosniak actually originated sometime in the third century of Bosnia being a part of the Ottoman Empire.
That is also the reason why today one can find Bosnjak as a last name in Turkey(Bosniaks moving to Turkey at the time of Austrian annexation of Bosnia and later dates) and in other former Ottoman provinces in the middle east. Even in Croatia there are Slavic Catholics with the last name Bosnjak(which is the result of the forceful conversion of Slavic Muslims in the Krajina and Dalmatia region after that territory was lost to the Venetian Republic).