Invalid certs

Thursday, 11 February 2016 · 4 messages · last reply 15 Feb 2016
ML
Marco Lettere11 Feb 2016 14:09 #
Hi all, sorry for this maybe dumb question. Is it possible to declare the IGNORECERT option inside a XQuery script that will be executed from inside a Java? Thanks, Marco.
CG
Christian Grün12 Feb 2016 21:59 #
Hi Marco,
Quoted text · Marco Lettere · 2 lines
> Is it possible to declare the IGNORECERT option inside a XQuery script that > will be executed from inside a Java?
If I get it right, you enabled this option, but would like to only disable it for your XQuery script? The answer, I guess, is no. As IGNORECERT is a global option, it will only be parsed when BaseX is initialized. Cheers from Prague, Christian
Quoted text · Marco Lettere · 6 lines
On Thu, Feb 11, 2016 at 2:09 PM, Marco Lettere <marco.lettere at dedalus.eu> wrote: > Hi all, > sorry for this maybe dumb question. > > Thanks, > Marco.
ML
Marco Lettere15 Feb 2016 10:40 #
Hi Christian, hope you had fun at XMLPrague! My case it's rather the other way around. I'd like to declare the IGNORECERT option online for a given call by keeping it disabled by default. This sounds to me like a reasonable use-case being the usual approach to this the rejection of invalid certificates. In my opinion (and I know it's not up to you) it should be even specified in the http:request structure in order to achieve a declarative way of expressing it at the finest grain possible. BTW, my issue was that being the request executed from inside an .xq that had to be run from embedded Java code linked with Basex.jar the global option was just not usable. At least to my knowledge. I circumvent this by sending the script through client:query() to a "nearby" Basex server instance which I conveniently restarted with the IGNORECERT in the .basex. Regards, Marco.
Quoted text · Christian Grün · 20 lines
On 12/02/2016 21:59, Christian Grün wrote: > Hi Marco, > >> Is it possible to declare the IGNORECERT option inside a XQuery script that >> will be executed from inside a Java? > If I get it right, you enabled this option, but would like to only > disable it for your XQuery script? The answer, I guess, is no. As > IGNORECERT is a global option, it will only be parsed when BaseX is > initialized. > > Cheers from Prague, > Christian > > > On Thu, Feb 11, 2016 at 2:09 PM, Marco Lettere <marco.lettere at dedalus.eu> wrote: >> Hi all, >> sorry for this maybe dumb question. >> >> Thanks, >> Marco.
CG
Christian Grün15 Feb 2016 10:47 #
Hi Marco,
Quoted text · Marco Lettere · 2 lines
> My case it's rather the other way around. I'd like to declare the IGNORECERT > option online for a given call by keeping it disabled by default.
I see. In Java, the decision how certificates are handled is a static one [1]; this makes it a bit difficult to restrict it to specific calls (in particular if parallel requests are to be handled). If you have some idea how this could be done differently in Java, your feedback is welcome. Cheers, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/io/IOUrl.java#L172
Quoted text · Marco Lettere · 44 lines
> This sounds to me like a reasonable use-case being the usual approach to > this the rejection of invalid certificates. > In my opinion (and I know it's not up to you) it should be even specified in > the http:request structure in order to achieve a declarative way of > expressing it at the finest grain possible. > > BTW, my issue was that being the request executed from inside an .xq that > had to be run from embedded Java code linked with Basex.jar the global > option was just not usable. At least to my knowledge. > I circumvent this by sending the script through client:query() to a "nearby" > Basex server instance which I conveniently restarted with the IGNORECERT in > the .basex. > > Regards, > Marco. > > > On 12/02/2016 21:59, Christian Grün wrote: >> >> Hi Marco, >> >>> Is it possible to declare the IGNORECERT option inside a XQuery script >>> that >>> will be executed from inside a Java? >> >> If I get it right, you enabled this option, but would like to only >> disable it for your XQuery script? The answer, I guess, is no. As >> IGNORECERT is a global option, it will only be parsed when BaseX is >> initialized. >> >> Cheers from Prague, >> Christian >> >> >> On Thu, Feb 11, 2016 at 2:09 PM, Marco Lettere <marco.lettere at dedalus.eu> >> wrote: >>> >>> Hi all, >>> sorry for this maybe dumb question. >>> >>> Thanks, >>> Marco. > >

⚡Generated with XQuery