Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
m2mconnectionsecurity.cpp
00001 /* 00002 * Copyright (c) 2015 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #include <string.h> 00018 #include "mbed-client/m2mconnectionhandler.h" 00019 #include "mbed-client/m2mconnectionsecurity.h" 00020 #include "mbed-client/m2mtimer.h" 00021 #include "mbed-client/m2msecurity.h" 00022 #include "mbed-client-mbedtls/m2mconnectionsecuritypimpl.h" 00023 00024 M2MConnectionSecurity::M2MConnectionSecurity(SecurityMode mode) 00025 { 00026 _private_impl = new M2MConnectionSecurityPimpl(mode); 00027 } 00028 00029 M2MConnectionSecurity::~M2MConnectionSecurity(){ 00030 delete _private_impl; 00031 } 00032 00033 void M2MConnectionSecurity::reset(){ 00034 _private_impl->reset(); 00035 } 00036 00037 int M2MConnectionSecurity::init(const M2MSecurity *security){ 00038 return _private_impl->init(security); 00039 } 00040 00041 int M2MConnectionSecurity::start_connecting_non_blocking(M2MConnectionHandler* connHandler) 00042 { 00043 return _private_impl->start_connecting_non_blocking(connHandler); 00044 } 00045 00046 int M2MConnectionSecurity::continue_connecting() 00047 { 00048 return _private_impl->continue_connecting(); 00049 } 00050 00051 int M2MConnectionSecurity::connect(M2MConnectionHandler* connHandler){ 00052 return _private_impl->connect(connHandler); 00053 } 00054 00055 int M2MConnectionSecurity::send_message(unsigned char *message, int len){ 00056 return _private_impl->send_message(message, len); 00057 } 00058 00059 int M2MConnectionSecurity::read(unsigned char* buffer, uint16_t len){ 00060 return _private_impl->read(buffer, len); 00061 } 00062 00063 void M2MConnectionSecurity::set_random_number_callback(random_number_cb callback) 00064 { 00065 _private_impl->set_random_number_callback(callback); 00066 } 00067 00068 void M2MConnectionSecurity::set_entropy_callback(entropy_cb callback) 00069 { 00070 _private_impl->set_entropy_callback(callback); 00071 }
Generated on Tue Jul 12 2022 12:28:36 by
