Escaping in X500Name

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Escaping in X500Name

Daniil Ivanov

I'm trying to feed these two Java strings into X500Name:
"O=Org \\\"Quoted\\\", OU=Org Unit"
"O=\"Org \\\"Quoted\\\"\", OU=\"Org Unit\""

I'm getting the following results.
O=Org \"Quoted\",OU=Org Unit
O=Org \\Quoted\"\, OU\=Org Unit

The first result is just like I expected with escaped quotes.
But the second one I fail to interpret. First quote seems to trigger escaping
so the first backslash gets escaped, but the second quote dissappears.
One can think, that second quote ends escaping, but then we see escaped coma and equal sign.

Thanks, Daniil