One important consideration for the Internet of Things is protecting sensitive data communicated from resource-constrained devices. In this paper, we investigate the performance of the Constrained Application Protocol and the Message Queue Telemetry Transport protocol in combination with and without their respective transport layer security. The testbed consisted of Raspberry Pi devices as representatives of resource-constrained devices and the evaluation identified that the processing of certificates and the establishment of a secure connection represents a heavy burden to the devices. Furthermore, the results show varying performances between the protocols when evaluated under lossy network conditions.