@@ -505,7 +505,9 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
505
505
if (mp.decoded .want_response && !myReply) {
506
506
myReply = allocErrorResponse (meshtastic_Routing_Error_NONE, &mp);
507
507
}
508
-
508
+ if (mp.pki_encrypted ) {
509
+ myReply->pki_encrypted = true ;
510
+ }
509
511
return handled;
510
512
}
511
513
@@ -941,6 +943,9 @@ void AdminModule::handleGetOwner(const meshtastic_MeshPacket &req)
941
943
res.which_payload_variant = meshtastic_AdminMessage_get_owner_response_tag;
942
944
setPassKey (&res);
943
945
myReply = allocDataProtobuf (res);
946
+ if (req.pki_encrypted ) {
947
+ myReply->pki_encrypted = true ;
948
+ }
944
949
}
945
950
}
946
951
@@ -1012,6 +1017,9 @@ void AdminModule::handleGetConfig(const meshtastic_MeshPacket &req, const uint32
1012
1017
res.which_payload_variant = meshtastic_AdminMessage_get_config_response_tag;
1013
1018
setPassKey (&res);
1014
1019
myReply = allocDataProtobuf (res);
1020
+ if (req.pki_encrypted ) {
1021
+ myReply->pki_encrypted = true ;
1022
+ }
1015
1023
}
1016
1024
}
1017
1025
@@ -1099,6 +1107,9 @@ void AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const
1099
1107
res.which_payload_variant = meshtastic_AdminMessage_get_module_config_response_tag;
1100
1108
setPassKey (&res);
1101
1109
myReply = allocDataProtobuf (res);
1110
+ if (req.pki_encrypted ) {
1111
+ myReply->pki_encrypted = true ;
1112
+ }
1102
1113
}
1103
1114
}
1104
1115
@@ -1123,6 +1134,9 @@ void AdminModule::handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &r
1123
1134
}
1124
1135
setPassKey (&r);
1125
1136
myReply = allocDataProtobuf (r);
1137
+ if (req.pki_encrypted ) {
1138
+ myReply->pki_encrypted = true ;
1139
+ }
1126
1140
}
1127
1141
1128
1142
void AdminModule::handleGetDeviceMetadata (const meshtastic_MeshPacket &req)
@@ -1132,6 +1146,9 @@ void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req)
1132
1146
r.which_payload_variant = meshtastic_AdminMessage_get_device_metadata_response_tag;
1133
1147
setPassKey (&r);
1134
1148
myReply = allocDataProtobuf (r);
1149
+ if (req.pki_encrypted ) {
1150
+ myReply->pki_encrypted = true ;
1151
+ }
1135
1152
}
1136
1153
1137
1154
void AdminModule::handleGetDeviceConnectionStatus (const meshtastic_MeshPacket &req)
@@ -1200,6 +1217,9 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
1200
1217
r.which_payload_variant = meshtastic_AdminMessage_get_device_connection_status_response_tag;
1201
1218
setPassKey (&r);
1202
1219
myReply = allocDataProtobuf (r);
1220
+ if (req.pki_encrypted ) {
1221
+ myReply->pki_encrypted = true ;
1222
+ }
1203
1223
}
1204
1224
1205
1225
void AdminModule::handleGetChannel (const meshtastic_MeshPacket &req, uint32_t channelIndex)
@@ -1211,6 +1231,9 @@ void AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t ch
1211
1231
r.which_payload_variant = meshtastic_AdminMessage_get_channel_response_tag;
1212
1232
setPassKey (&r);
1213
1233
myReply = allocDataProtobuf (r);
1234
+ if (req.pki_encrypted ) {
1235
+ myReply->pki_encrypted = true ;
1236
+ }
1214
1237
}
1215
1238
}
1216
1239
@@ -1220,6 +1243,9 @@ void AdminModule::handleGetDeviceUIConfig(const meshtastic_MeshPacket &req)
1220
1243
r.which_payload_variant = meshtastic_AdminMessage_get_ui_config_response_tag;
1221
1244
r.get_ui_config_response = uiconfig;
1222
1245
myReply = allocDataProtobuf (r);
1246
+ if (req.pki_encrypted ) {
1247
+ myReply->pki_encrypted = true ;
1248
+ }
1223
1249
}
1224
1250
1225
1251
void AdminModule::reboot (int32_t seconds)
0 commit comments