forked from iotivity/iotivity-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PlgdTime: Fetch time from endpoint (iotivity#408)
* plgd/time: fetch time from endpoint Add plgd_time_fetch to plgd_time feature to retrieve time from an endpoint. For TLS/DTLS if a session to the endpoint is not yet established then the feature tries to create a new session. However, since the device might have a desynchronized time the certificate verification functions are overriden to ignore time validity. This might be a security risk, so once a response is received this connection is scheduled to be closed. The client might be required to wait for the session to disconnect before reconnecting to the endpoint. This can be achieved using the sessions_events API.
- Loading branch information
1 parent
0772309
commit 42676ae
Showing
28 changed files
with
903 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/**************************************************************************** | ||
* | ||
* Copyright (c) 2022 Daniel Adam, All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"), | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
#ifndef OC_ENDPOINT_INTERNAL_H | ||
#define OC_ENDPOINT_INTERNAL_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#define OC_SCHEME_COAP "coap://" | ||
#define OC_SCHEME_COAPS "coaps://" | ||
#define OC_SCHEME_COAP_TCP "coap+tcp://" | ||
#define OC_SCHEME_COAPS_TCP "coaps+tcp://" | ||
|
||
/** @brief Get scheme string for transport flags */ | ||
const char *oc_endpoint_flags_to_scheme(unsigned flags); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* OC_ENDPOINT_INTERNAL_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.