#include <stdlib.h>
#include <sys/types.h>
#include "tinydtls.h"
Go to the source code of this file.
|  | 
| typedef unsigned char | uint8 | 
|  | 
| typedef unsigned char | uint16 [2] | 
|  | 
| typedef unsigned char | uint24 [3] | 
|  | 
| typedef unsigned char | uint32 [4] | 
|  | 
| typedef unsigned char | uint48 [6] | 
|  | 
|  | 
| static void | memxor (unsigned char *x, const unsigned char *y, size_t n) | 
|  | 
| static int | equals (unsigned char *a, unsigned char *b, size_t len) | 
|  | 
| static int | dtls_fls (unsigned int i) | 
|  | 
      
        
          | #define DTLS_DEFAULT_MAX_RETRANSMIT   7 | 
      
 
Number of message retransmissions. 
Definition at line 70 of file global.h.
 
 
      
        
          | #define DTLS_MAX_BUF   1400 | 
      
 
Maximum size of DTLS message. When Peers are sending bigger messages this causes problems. Californium with ECDSA needs at least 220 
Definition at line 64 of file global.h.
 
 
      
        
          | #define TLS_CERT_TYPE_RAW_PUBLIC_KEY   2 /* see RFC 7250 */ | 
      
 
 
      
        
          | #define TLS_CLIENT_CERTIFICATE_TYPE_ECDSA_SIGN   64 /* see RFC 4492 */ | 
      
 
 
      
        
          | #define TLS_EC_CURVE_TYPE_NAMED_CURVE   3 /* see RFC 4492 */ | 
      
 
 
      
        
          | #define TLS_EXT_CLIENT_CERTIFICATE_TYPE   19 /* see RFC 7250 */ | 
      
 
 
      
        
          | #define TLS_EXT_EC_POINT_FORMATS   11 /* see RFC 4492 */ | 
      
 
 
      
        
          | #define TLS_EXT_EC_POINT_FORMATS_UNCOMPRESSED   0 /* see RFC 4492 */ | 
      
 
 
      
        
          | #define TLS_EXT_ELLIPTIC_CURVES   10 /* see RFC 4492 */ | 
      
 
 
      
        
          | #define TLS_EXT_ELLIPTIC_CURVES_SECP256R1   23 /* see RFC 4492 */ | 
      
 
 
      
        
          | #define TLS_EXT_ENCRYPT_THEN_MAC   22 /* see RFC 7366 */ | 
      
 
 
      
        
          | #define TLS_EXT_SERVER_CERTIFICATE_TYPE   20 /* see RFC 7250 */ | 
      
 
 
      
        
          | #define TLS_EXT_SIG_HASH_ALGO   13 /* see RFC 5246 */ | 
      
 
 
      
        
          | #define TLS_EXT_SIG_HASH_ALGO_ECDSA   3 /* see RFC 5246 */ | 
      
 
 
      
        
          | #define TLS_EXT_SIG_HASH_ALGO_SHA256   4 /* see RFC 5246 */ | 
      
 
 
      
        
          | typedef unsigned char uint16[2] | 
      
 
 
      
        
          | typedef unsigned char uint24[3] | 
      
 
 
      
        
          | typedef unsigned char uint32[4] | 
      
 
 
      
        
          | typedef unsigned char uint48[6] | 
      
 
 
      
        
          | typedef unsigned char uint8 | 
      
 
 
Known cipher suites. 
| Enumerator | 
|---|
| TLS_NULL_WITH_NULL_NULL | NULL cipher  | 
| TLS_PSK_WITH_AES_128_CCM_8 | see RFC 6655  | 
| TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 | see RFC 7251  | 
Definition at line 74 of file global.h.
 
 
Known compression suites. 
| Enumerator | 
|---|
| TLS_COMPRESSION_NULL |  | 
Definition at line 81 of file global.h.
 
 
  
  | 
        
          | static int dtls_fls | ( | unsigned int | i | ) |  |  | inlinestatic | 
 
 
  
  | 
        
          | static int equals | ( | unsigned char * | a, |  
          |  |  | unsigned char * | b, |  
          |  |  | size_t | len |  
          |  | ) |  |  |  | inlinestatic | 
 
Compares len bytes from a with b in constant time. This functions always traverses the entire length to prevent timing attacks.
- Parameters
- 
  
    | a | Byte sequence to compare |  | b | Byte sequence to compare |  | len | Number of bytes to compare. |  
 
- Returns
- 1if- aand- bare equal,- 0otherwise.
Definition at line 127 of file global.h.
 
 
  
  | 
        
          | static void memxor | ( | unsigned char * | x, |  
          |  |  | const unsigned char * | y, |  
          |  |  | size_t | n |  
          |  | ) |  |  |  | inlinestatic | 
 
XORs n bytes byte-by-byte starting at y to the memory area starting at x. 
Definition at line 109 of file global.h.