Reading a little further down that documentation page, it explains that you can use a variable of a different form to get the entire string. Can you try this?
var DN = context.getVariable("request.header.x-client-certificate-issuer.values.string");
This will work if you have commas in the header value.
A little more explanation and context:
The issue relates to the meaning of commas mean within HTTP headers. The HTTP spec allows multiple headers of the same name in a request. Suppose I can have a request that has repeated instances of a header, like this:
And Apigee recognizes that. Specifically for headers that contain commas, also known as multi-valued headers, Apigee allows you to retrieve any of those 3 values, by using a variable name like request.header.HEADERNAME.N , where N is replaced by an index {1, 2, 3}. And you can retrieve the entire string, effectively ignoring the commas, by using request.header.HEADERNAME.values.string .