mirror of
https://github.com/fairwaves/openbts-2.8.git
synced 2025-10-23 07:42:01 +00:00
Implemented encryption procedure for SMS.
Added encryption procedure to MOSMSController and MTSMSController.
This commit is contained in:
committed by
Alexander Chemeris
parent
286421ac67
commit
b666c3716d
@@ -207,9 +207,22 @@ void Control::MOSMSController(const GSM::L3CMServiceRequest *req, GSM::LogicalCh
|
||||
|
||||
// FIXME: check provisioning
|
||||
|
||||
if (gConfig.getNum("GSM.Authentication")||gConfig.getNum("GSM.Encryption")) {
|
||||
AuthenticationParameters authParams(mobileID);
|
||||
registerIMSI(authParams, LCH);
|
||||
authenticate(authParams, LCH);
|
||||
}
|
||||
|
||||
// Let the phone know we're going ahead with the transaction.
|
||||
LOG(INFO) << "sending CMServiceAccept";
|
||||
if (LCH->isDecrypting()) {
|
||||
LOG(INFO) << "Decryption ACTIVE for:" << mobileID << " CMServiceAccept NOT sent, because CipherModeCommand implies it.";
|
||||
}
|
||||
else {
|
||||
LOG(INFO) << "Decryption NOT active for: " << mobileID << " Sending CMServiceAccept";
|
||||
LCH->send(GSM::L3CMServiceAccept());
|
||||
}
|
||||
|
||||
|
||||
// Wait for SAP3 to connect.
|
||||
// The first read on SAP3 is the ESTABLISH primitive.
|
||||
delete getFrameSMS(LCH,GSM::ESTABLISH);
|
||||
@@ -311,6 +324,7 @@ void Control::MOSMSController(const GSM::L3CMServiceRequest *req, GSM::LogicalCh
|
||||
|
||||
bool Control::deliverSMSToMS(const char *callingPartyDigits, const char* message, const char* contentType, unsigned L3TI, GSM::LogicalChannel *LCH)
|
||||
{
|
||||
|
||||
if (!LCH->multiframeMode(3)) {
|
||||
// Start ABM in SAP3.
|
||||
LCH->send(GSM::ESTABLISH,3);
|
||||
@@ -489,6 +503,12 @@ void Control::MTSMSController(TransactionEntry *transaction, GSM::LogicalChannel
|
||||
}
|
||||
}
|
||||
|
||||
if (gConfig.getNum("GSM.Authentication")||gConfig.getNum("GSM.Encryption")) {
|
||||
AuthenticationParameters authParams(transaction->subscriber());
|
||||
registerIMSI(authParams, LCH);
|
||||
authenticate(authParams, LCH);
|
||||
}
|
||||
|
||||
bool success = deliverSMSToMS(transaction->calling().digits(),transaction->message(),
|
||||
transaction->messageType(),transaction->L3TI(),LCH);
|
||||
|
||||
|
Reference in New Issue
Block a user