Various provisions of the GDPR concern the judiciary, the courts, the legal system and the enforcement of the law:
Prevention, Investigation, Detection or Prosecution of Criminal Offences: Art. 2 II d and 23 I d as well as Rec. 19 and 73 GDPR.
Prevention, Investigation, Detection and Prosecution of Breaches of Ethics for Regulated Professions: Art. 23 I g and Rec. 73 GDPR.
Execution of Criminal Penalties: Art. 2 II d and 23 I d as well as Rec. 19 and 73 GDPR.
Protection of Judicial Independence and Judicial Proceedings: Art. 23 I f and Rec. 20 GDPR.
Courts acting in their judicial capacity: Art. 9 II f GDPR.
Establishment, Exercise or Defence of Legal Claims: Art. 9 II f, 17 III e, 18 II, 21 I and 49 I e as well as Rec. 52, 65 and 111 (1) GDPR.
Enforcement of Civil Law Claims: Art. 23 I j GDPR.