The warranty comes from Honda. If Honda didn't sell the part to the dealer, it is not an approved mod. However, the warranty is unaffected unless the modification caused the problem. For example, just because you changed the exhaust, you generally have not affected the warranty on the brakes, electrical system, etc.. If you have tapped into the electrical system and now have an electrical problem, don't expect the dealer to automatically send the bill to Honda.
***I work with autos. In the USA, the rules should be the same for bikes. (The warranty terms, laws and customs in Australia, Thailand, India, Canada or anywhere else may be different.)