Aerobridge Guardian (Version 0.2)#12
Aerobridge Guardian (Version 0.2)#121AwesomeDeveloper wants to merge 10 commits intoopenutm-labs:aerobridge-guardianfrom
Conversation
|
Is it possible to add OpenSSL as an external submodule? from here ? |
botmayank
left a comment
There was a problem hiding this comment.
@1AwesomeDeveloper quite a lot of really nice work, have a look to see if the comments make sense.
| @@ -4,18 +4,14 @@ | |||
| #include <QObject> | |||
| #include "QGCApplication.h" | |||
|
|
|||
| ///This class establishes a connection to the authentication server. If connection is succesful, it emits signal for the UI | |||
There was a problem hiding this comment.
@1AwesomeDeveloper do you want to leave at least one basic top level comment for the header?
modifications/DataClass.cc
Outdated
| } | ||
|
|
||
| //API CALLS START | ||
| //******************************************************************************************************************************************************************************* |
There was a problem hiding this comment.
Seems unnecessary to have API calls start and this comment
modifications/DataClass.cc
Outdated
| } | ||
| } | ||
|
|
||
| //******************************************************************************************************************************************************************************* |
modifications/DataClass.cc
Outdated
| emit tokenNotGenerated(); | ||
| showMessage("Unable to Connect to Server", statusCode); |
There was a problem hiding this comment.
Minor but connect and server need not be in capital, also if 201 and 200 checks are to be performed elsewhere, might be nice to have them as a #define/enum on top. Would help avoid having magic numbers in the code even though these are well known status codes.
There was a problem hiding this comment.
Done, error codes are already an enum, no need to define in a separate header file because all API calls are made using dataClass
modifications/DataClass.cc
Outdated
| } | ||
| } | ||
|
|
||
| //******************************************************************************************************************************************************************************* |
modifications/NpntProcess.qml
Outdated
| Column{ | ||
| CheckBox { | ||
| id: c1 | ||
| checked:myrect.hardwareConnected | ||
| text: qsTr("Hardware Connected") | ||
| text: qsTr("Connecting to the Flight Controller") |
There was a problem hiding this comment.
Both are fine, the status is represented by a checkbox. The text was given by @not-vibhu.
Currently changing it to "connected". Can be reverted if needed
| EVP_PKEY * pRsaKey = EVP_PKEY_new(); | ||
| RSA_set0_key(rr, modul, expon , kids); | ||
| EVP_PKEY_assign_RSA(pRsaKey, rr); | ||
| unsigned char * ss = new unsigned char[1024]; |
There was a problem hiding this comment.
any way of doing this without new delete and using a unique_ptr?
There was a problem hiding this comment.
A follow up question: Why are we writing this SignatureVerifier::convertJwkToPem conversion ourselves and not using jwt-cpp approach since we're already using jwt-cpp?
Example: https://github.com/Thalhammer/jwt-cpp/blob/master/example/jwks-verify.cpp
Reference code: https://github.com/Thalhammer/jwt-cpp/blob/142d2d38e7bb1ad17b9787d776589e719d7494cb/include/jwt-cpp/jwt.h#L462
modifications/SignatureVerifier.cc
Outdated
| { | ||
| std::error_code c; | ||
| try { | ||
| auto verify = jwt::verify().allow_algorithm(jwt::algorithm::rs256(strPubKey)).with_issuer("https://id.openskies.sh/"); |
There was a problem hiding this comment.
Why is this URL not coming from the globals dict?
| QStringList PlanMasterController::getAllPlans() const | ||
| { | ||
| QStringList allPlans = qgcApp()->getDataClass()->getAllPlans(); | ||
| allPlans.push_front("No Plan Selected"); |
There was a problem hiding this comment.
In general in your logs, avoid unnecessary capitalization of common words. Like this one should be "No plan selected"
| @@ -155,5 +186,7 @@ private slots: | |||
| QmlObjectListModel* _planCreators = nullptr; | |||
| DataClass* _dataClass; | |||
| QString m_url; | |||
| int m_planIndex = 0; | |||
There was a problem hiding this comment.
How many plans are we going to be holding? Sure int is enough right?
There was a problem hiding this comment.
Might make sense to have a larger data type if you need, or even with int, have a max bound for how many plans one is allowed to create/keep, and have a check to either delete older plans or overwrite in a circular fashion or alteast alert the operator.
There was a problem hiding this comment.
I'd suggest to atleast make it unsigned int. It'll double the current limit and then we can have some checks to prevent any rollovers.
There was a problem hiding this comment.
Changed it to unsigned long long int
Features Implemented