Tail Light Housing Black Body Sealer?

On my 64 tail lights, when I removed them, there was some black putty like substance that presumably looked like it water proofed them to the body. Any idea what that stuff is called and where can I get it. Working on getting the rear end water proofed.

Also, there was a black rubber gasket that goes between the light housing and the body. From the outside it looks similar to a door edge molding. Any Ideas for an adequate substitute?

Thanks.