https://bz.apache.org/bugzilla/show_bug.cgi?id=66670

--- Comment #8 from Michael Osipov <micha...@apache.org> ---
(In reply to Christopher Schultz from comment #1)
> Why not just use an XML entity?
> 
> <!DOCTYPE Context [
> <!ENTITY certPassword "tiger">
> ]>
> ...
> ...
> <SSLHostConfig certificateKeyPassword="&certPassword;"
> ...>
> <SSLHostConfig certificateKeyPassword="&certPassword;"
> ...>
> <SSLHostConfig certificateKeyPassword="&certPassword;"
> ...>
> <SSLHostConfig certificateKeyPassword="&certPassword;"
> ...>
> <SSLHostConfig certificateKeyPassword="&certPassword;"
> ...>
> <SSLHostConfig certificateKeyPassword="&certPassword;"
> ...>
> 
> Or, if you really want to use a separate file:
> 
> <!DOCTYPE Context [
> <!ENTITY certPassword SYSTEM "file:///etc/ssl/%%VIRTUAL_HOSTNAME%%/password">
> ]>
> 
> ?

This does not work:
SCHWERWIEGEND: Parse Fatal Error at line 33 column 44: Externe Entityreferenz
"&certPassword;" ist in einem Attributwert nicht zulässig.
org.xml.sax.SAXParseException; systemId:
file:/var/opt/tomcat-services/conf/server.xml; lineNumber: 33; columnNumber:
44; Externe Entityreferenz "&certPassword;" ist in einem Attributwert nicht
zulässig.
        at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
        at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
        at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
        at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:32

because of https://stackoverflow.com/a/65784393/696632

I will pursue a draft PR next week.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to