Cert-Viewer error when performed the verify certificate button

#1

Hello,

I’m testing the blockcerts for creating models, issuing certificates without problem. My next step is to visualize and verify my .json signed in the cert-viewer component.

Before start the tests in cert-viewer tool, I uploaded my json file in blockerts universal verifier to make sure that my certificate was without errors

So, I configured the cert-viewer at the local url, and clicked on a valid certificate to see it (hosted in cert_data) and this work to view it. But I realize when I click in the button “verify certificate” nothing happen.

After perform click, I catch some erros listed bellow…

Obs: I just changed the original host in log to http://www.mywebsite.

  • Debug mode: off
    2019-04-23 23:00:36,295 - werkzeug - INFO - * Running on http://127.0.0.1:7000/ (Press CTRL+C to quit)
    2019-04-23 23:00:50,216 - root - DEBUG - Retrieving certificate for uid=96cf7092-1343-4943-a9e1-a556850e4847
    2019-04-23 23:00:50,217 - root - DEBUG - Found certificate for uid=96cf7092-1343-4943-a9e1-a556850e4847
    2019-04-23 23:00:50,245 - werkzeug - INFO - 127.0.0.1 - - [23/Apr/2019 23:00:50] “GET /96cf7092-1343-4943-a9e1-a556850e4847 HTTP/1.1” 200 -
    2019-04-23 23:00:52,813 - root - DEBUG - Retrieving certificate for uid=96cf7092-1343-4943-a9e1-a556850e4847
    2019-04-23 23:00:52,814 - root - DEBUG - Found certificate for uid=96cf7092-1343-4943-a9e1-a556850e4847
    2019-04-23 23:00:52,824 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): www.mywebsite:80
    2019-04-23 23:00:52,848 - urllib3.connectionpool - DEBUG - http://www.mywebsite:80 “GET /UFP.json HTTP/1.1” 200 3748
    2019-04-23 23:00:52,849 - root - DEBUG - Found results at url=http://www.mywebsite/UFP.json
    2019-04-23 23:00:52,854 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): www.mywebsite:80
    2019-04-23 23:00:52,881 - urllib3.connectionpool - DEBUG - http://www.mywebsite:80 “GET / HTTP/1.1” 200 209
    2019-04-23 23:00:52,882 - root - ERROR - Unhandled Exception: Expecting value: line 1 column 1 (char 0)
    Traceback (most recent call last):
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flask/app.py”, line 1813, in full_dispatch_request
    rv = self.dispatch_request()
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flask/app.py”, line 1799, in dispatch_request
    return self.view_functionsrule.endpoint
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/flask/views.py”, line 88, in view
    return self.dispatch_request(*args, **kwargs)
    File “/ufp/cert-viewer/cert_viewer/views/verify_view.py”, line 11, in dispatch_request
    view_model = self.view(*args, **kwargs)
    File “/ufp/cert-viewer/cert_viewer/verifier_bridge.py”, line 13, in verify
    verify_response = verifier.verify_certificate(certificate, options=options)
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cert_verifier/verifier.py”, line 22, in verify_certificate
    issuer_info = connectors.get_issuer_info(certificate_model)
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cert_verifier/connectors.py”, line 240, in get_issuer_info
    revoked_json = get_remote_json(revocation_url)
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cert_verifier/connectors.py”, line 183, in get_remote_json
    remote_json = r.json()
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py”, line 897, in json
    return complexjson.loads(self.text, **kwargs)
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/simplejson/init.py”, line 518, in loads
    return _default_decoder.decode(s)
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/simplejson/decoder.py”, line 370, in decode
    obj, end = self.raw_decode(s)
    File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/simplejson/decoder.py”, line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
    simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    2019-04-23 23:00:52,888 - werkzeug - INFO - 127.0.0.1 - - [23/Apr/2019 23:00:52] “GET /verify/96cf7092-1343-4943-a9e1-a556850e4847 HTTP/1.1” 500 -
#2

Well,

I decided to change to cert-web-component, it’s better.

Att,
Fernando.