summaryrefslogtreecommitdiffstats
path: root/sessions_manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netipmid: replace std::cerr with phosphor::logging callsVernon Mauery2018-12-191-9/+4
| | | | | | | | This is part of a cleanup and standardization effort of code to get existing code up to date. Change-Id: I0c982ef8d7afa2f56a9cd204bb8ac3112769641c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: startSession does not need to call getSessionVernon Mauery2018-11-211-14/+11
| | | | | Change-Id: Id0e482705e8fda39270ec2e6c3534f81d11797b3 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: use libcrypto prng instead of insecure std::randVernon Mauery2018-11-141-2/+0
| | | | | | | | | | | | | std::rand is insecure. Add a simple openssl-crypto wrapper for a similar interface that can replace it. Tested-by: Run ipmitool six times in parallel to see that five independent sessions are created and the sixth one causes the BMC to dump the session list on the console. Note that the session numbers are still random. Change-Id: I0b387f1343abefc45be0d62cf9af45fbd5563047 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: use std::shared_ptr instead of weak_ptr/lockVernon Mauery2018-11-061-3/+3
| | | | | | | | | | | | | All of the instances of getSession and startSession were assigning the result to a local shared_ptr via lock on the weak_ptr. It doesn't make sense to demote the shared_ptr (from the sessionsMap) to a weak_ptr via the return, only to promote to a shared_ptr again via lock. Tested-by: running ipmitool -H a.b.c.d -P 0penBmc -I lanplus mc info Sessions start and stop, same as before. Change-Id: Ic10779285891d73ee51115f16ed0000b38d1c52a Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: apply clang-format rulesVernon Mauery2018-11-021-25/+23
| | | | | | | | Lots of whitespace change. Let clang-format do its job and keep the code looking nice. Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Spelling fixesGunnar Mills2018-04-111-1/+1
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I30765c0f799dabdb44b705a9720014db9a1b21df Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add support for cipher suite 17Vernon Mauery2017-12-081-0/+7
| | | | | | | | | cipher suite 17 uses RAKP_HMAC_SHA256 for authentication and RAKP_HMAC_SHA256_128 for integrity. This adds those in and fixes up the lookups so the stack knows about the new algorithms. Change-Id: Icdc66563d08060fc0e541ceaf3bee9dd5f89fdb2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Prepare for adding RMCP+ cipher suite 17Vernon Mauery2017-12-071-1/+1
| | | | | | | | | | In many places, there are baked-in assumptions about algorithms that tie the session initiation to cipher suite 3. This commit teases out those assumptions and prepares for the next patch that actually adds in the new authentication and integrity algorithms to support cipher suite 17. Change-Id: I2ee3672a7c503b89c5ff0aba30cf7a4601e24d04 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* sol: Handle deactivate payload correctly when session is closedTom Joseph2017-08-141-0/+2
| | | | | | | | Resolves openbmc/openbmc#1781 Resolves openbmc/openbmc#2053 Change-Id: Iabb61fc510d33a4132e7ad07184eb8847301b686 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Authentication Algo keeps record of the Confidentiality algoTom Joseph2017-02-241-2/+4
| | | | | | | | | The confidentiality algo negotiated during Open Session Request would be stored in the Authentication algorithm and is activated once the session setup is successful. Change-Id: I4d5efd71a992dd0cf505bcf7a6d9ebb394bcb880 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Authentication Algorithm keeps record of the Integrity algoTom Joseph2017-01-171-2/+3
| | | | | | | | | The Integrity algorithm negotiated during Open Session Request would be stored in the Authentication algorithm and is activated once the session setup is successful. Change-Id: I780680c8991487f8fd9030217793f2b0d0fa8a25 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Session Commands ImplementationTom Joseph2017-01-091-8/+9
| | | | | | | | Implements Set Session Privilege Command and Close Session command. Change-Id: I18aeee7bcae48db3eb8a61292c9333ca2304dcf1 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Sessions Manager to manage IPMI sessionsTom Joseph2016-12-121-0/+166
IPMI Sessions manager is responsible for managing IPMI sessions and routines for starting and stopping sessions. Change-Id: Ic5c559fdc0dab0145e463689026c2f1c66f24a59 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud