Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xml parsing error, issue clear and debbuged #12

Open
Ecniv64 opened this issue Nov 20, 2014 · 3 comments
Open

Xml parsing error, issue clear and debbuged #12

Ecniv64 opened this issue Nov 20, 2014 · 3 comments

Comments

@Ecniv64
Copy link

Ecniv64 commented Nov 20, 2014

hello again, I have some difficulties with the xml bug..

My xml file (ocspd) seems to be correct, I uploaded it to some xml parser / verifiers and no errors were throw.

But the programs tells that something is wrong with it, so I debugged a bit the whole thing:

root@kali:/usr/etc/ocspd# ocspd -c ocspd.conf -v
OpenCA's OCSP Responder - v3.1.0
(c) 2002-2014 by Massimiliano Pala and OpenCA Project
OpenCA licensed software

Calling PKI_CONFIG_load on file config.c line 45
PKI_CONFIG_load(char *urlPath) func (file pki.config line 94): url->addr = /usr/etc/ocspd/ocspd.conf
Call of xmlCtxtReadFile(parserCtxt, url->addr [...]) line 138 in pki_config.c
Trying to read member of struct doc ...
Doc->name is not available, access try gives a segmentation fault
Exiting PKI_CONFIG_load function and returning malformated struct doc
OCSPD_load_config func, calling PKI_CONFIG_get_value on line 93 of file config.c (token initialisation)

Function PKI_CONFIG_get_value on line 410 (pki_config.c)... receiving parameters : (PKI _config *doc = (null), char *search = /serverConfig/general/pkiConfigDir)
Call of PKI_CONFIG_get_element_stack ( doc, search )) line 524 in file pki.config.c : function receive null parameter from above, null returns and error are then generated

root@kali:~/OCSPD# cat /var/log/syslog | grep ocspd
Nov 20 11:37:41 kali ocspd[11632]: OpenCA OCSPD v3.1.0 - starting.
Nov 20 11:37:41 kali ocspd[11632]: [pki_config.c:35] [ERROR] XML I/O Error: Start tag expected, '<' not found
Nov 20 11:37:41 kali ocspd[11632]: [config.c:96] [ERROR] Missing pkiConfigDir in configuration!
Nov 20 11:37:41 kali ocspd[11632]: ocspd - ERROR::can not load config file!#12 (exit with 1)#12
root@kali:/usr/etc/ocspd#

I would like also to ask about the namespace thing in xml :
<pki:serverConfig xmlns:pki="http://www.openca.org/pki/1/0/0">

This url seems invalid (404), is that the reason of the malfunction ?

@opencrypto
Copy link
Member

Is this still valid in the new release (v3.1.1+) or can we close this issue ?

@Codelica
Copy link

I'm new to the package but seem to be running into the same issue on a fresh build of 3.1.1 (Centos 6):

root@watchtower:ocsp# ocspd -c ocspd.conf -stdout  -v

OpenCA's OCSP Responder - v3.1.1
(c) 2002-2014 by Massimiliano Pala and OpenCA Project
    OpenCA licensed software

Jul 31 23:10:44 2015 GMT [3496] GENERAL: OpenCA OCSPD v3.1.1 - starting.
Jul 31 23:10:44 2015 GMT [3496] ERROR: [pki_config.c:35] [ERROR] XML I/O Error: Start tag expected, '<' not found

Jul 31 23:10:44 2015 GMT [3496] ERROR: [config.c:90] [ERROR] Missing pkiConfigDir in configuration!
Jul 31 23:10:44 2015 GMT [3496] ERROR: ocspd - ERROR::can not load config file!
 (exit with 1)

@Codelica
Copy link

Codelica commented Aug 4, 2015

As a followup, this was new user error. OCSPd moved to XML based configuration at some point, which is obviously different that the ocspd.conf configuration I was feeding it. My confusion came from the man page for ocspd.conf that still ships and installs with the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants