Skip to content

patroneos with https - simple mode #51

@gitggooss

Description

@gitggooss

Patroneos is a great tool to protect API from a malformed json query and it works perfect under HTTP protocol on an eosio node:

curl http://mydomain.com:8887/v1/chain/get_code -X POST -d '{c}' | json_pp

OUTPUT:

{
   "code" : 400,
   "message" : "INVALID_JSON"
}

Simply perfect!!!

The problem I get is with HTTPS.
Under HTTPS protocol, unfortunately, I get some error; here the config.json for patroneos on HTTPS:

{
    "listenIP": "0.0.0.0",
    "configListenPort": "9000",
    "listenPort": "8889",

    "nodeosProtocol": "https",
    "nodeosUrl": "mydomain.com",
    "nodeosPort": "8888",

    "contractBlackList": {
        "currency": true
    },
    "maxSignatures": 10,
    "maxTransactionSize": 1000000,
    "maxTransactions": 32,
    "headers": {
        "Sample-Header": "value"
    }
}

When I try to send an malformed json query, the connection is with TLSv1.3, but the given message is not the expected "invalid json" but a general system error:

curl -vvv https://mydomain.com:8889/v1/chain/get_code -X POST -d '{c}' | json_pp

OUTPUT:

..
....
* Closing connection 0
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

Is
"nodeosProtocol": "https"
in config.json allowed to work?

Thanks.
Giuseppe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions