Commit 41e92f25 authored by Yann Garcia's avatar Yann Garcia
Browse files

Update certificates

parent b2f059c6
......@@ -8,7 +8,7 @@
#include "converter.hh"
unsigned char commsignia_layer::_fixed_header[12] = { 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x0D, 0x00, 0x00 };
unsigned char commsignia_layer::_fixed_header[10] = { 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x0D };
commsignia_layer::commsignia_layer(const std::string & p_type, const std::string & param) : layer(p_type), _params(), _c2p_recv{0}, _802_11p_hdr{0}, _c2p_llc_hdr{0}, _mac_src(), _eth_type() {
loggers::get_instance().log(">>> commsignia_layer::commsignia_layer: %s, %s", to_string().c_str(), param.c_str());
......@@ -41,6 +41,10 @@ commsignia_layer::commsignia_layer(const std::string & p_type, const std::string
if (it == _params.cend()) {
_params.insert(std::pair<std::string, std::string>(std::string("data_rate"), "12")); // 12 * 500Kbps = 6Mbps
}
it = _params.find(std::string("use_vpn"));
if (it == _params.cend()) {
_params.insert(std::pair<std::string, std::string>(std::string("use_vpn"), "0"));
}
//_params.log();
}
......@@ -48,6 +52,13 @@ void commsignia_layer::send_data(OCTETSTRING& data, params& params) {
loggers::get_instance().log_msg(">>> commsignia_layer::send_data: ", data);
OCTETSTRING buffer(12, commsignia_layer::_fixed_header);
if (_params[std::string("use_vpn")].compare("1") == 0) {
buffer += int2oct(1, 1); // Injection to software
} else {
buffer += int2oct(0, 1); // Injection to radio
}
buffer += int2oct(0, 1); // Fix
loggers::get_instance().log_msg("commsignia_layer::send_data: buffer: ", buffer);
buffer += int2oct(std::stoi(_params[params::interface_id]), 4);
loggers::get_instance().log_msg("commsignia_layer::send_data: buffer: ", buffer);
buffer += int2oct(std::stoi(_params[std::string("data_rate")]), 4);
......
......@@ -80,7 +80,7 @@ class commsignia_layer : public layer {
std::vector<unsigned char> _eth_type; //! Used to optimize filtering on ethernet type in \see commsignia_layer::receive_data method
//! Fixed header for packet injection
static unsigned char _fixed_header[12];
static unsigned char _fixed_header[10];
public:
//! \publicsection
......
......@@ -25,7 +25,12 @@ LibItsPki_Pics.PICS_ITS_S_CANONICAL_ID := '1B4CA1210123AE900
LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID := "CERT_GEMALTO_EA"
LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID := "CERT_GEMALTO_AA"
LibItsPki_Pixits.PX_AUTHORIZATION_REQUEST_WITH_POP := false # Not private key available
LibItsPki_Pixits.PX_AUTHORIZATION_REQUEST_WITH_POP := false # Not private key available
LibItsPki_Pics.PICS_SECPKI_REENROLMENT := true
LibItsPki_Pixits.PX_EC_PRIVATE_KEY := '7F14157FF7644A357B7845557AC4CC65A5CFD2570EF2D3A67F8CD5AECC9B9453'O
LibItsPki_Pixits.PX_EC_HASHED_ID8 := '6F39A071EF045942'O
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......
......@@ -124,7 +124,7 @@ LogEventTypes:= Yes
# its_aid = 36 CAM
# its_aid = 37 DENM
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=eth1,filter=and ether proto 0x8947)"
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,target_host=10.8.0.1)/UDP(dst_ip=10.8.0.1,src_port=7943,dst_port=7943)"
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,use_vpn=1,target_host=10.8.0.1)/UDP(dst_ip=10.8.0.1,src_port=7943,dst_port=7943)"
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,target_host=10.8.0.1)/UDP_PCAP(dst_ip=10.8.0.1,dst_port=7943,src_ip=192.168.0.154,src_port=39474)/ETH(mac_src=0800275c4959,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=tap0,filter=and (udp port 39474 or udp port 7943))"
#system.geoNetworkingPort.params := "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment