Functions relating to HTTPS Content Verification.
More...
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <openssl/evp.h>
#include "mh5hash.h"
#include "mh5base.h"
#include "mh5memory.h"
#include "mh5fileorm.h"
#include "mh5sig.h"
#include "stb_os.h"
Go to the source code of this file.
|
#define | GET_16BITS_FROM_ARRAY(X, Y) ((X[Y] << 8) | X[Y + 1]) |
|
|
enum | HashFileState_t {
HASH_FILE_RELOAD,
HASH_FILE_WAITING_FOR_HASH,
HASH_FILE_WAITING_FOR_SIG,
HASH_FILE_WAITING_FOR_HASH_AND_SIG,
HASH_FILE_WAITING_FOR_CERT,
HASH_FILE_VERIFYING,
HASH_FILE_VERIFIED,
HASH_FILE_FAILED
} |
|
enum | RequestState_t { REQ_OK,
REQ_FAILED,
REQ_PENDING
} |
|
Functions relating to HTTPS Content Verification.
- Date
- 22/02/2010
- Author
- Omri Barel
Definition in file mh5hash.c.
MHEG5ContentVerification_t MHEG5IsContentVerified |
( |
U8BIT * |
url, |
|
|
U8BIT * |
content, |
|
|
U32BIT |
length |
|
) |
| |
- Parameters
-
url | URL of the content to be verified |
content | Pointer to the content to be verified |
length | Size of content in bytes |
- Returns
- CONTENT_NOT_VERIFIED_NEW if content could not be verified CONTENT_VERIFIED if the content was verified, CONTENT_VERIFICATION_PENDING if the verification process could not be completed, pending a file-load
Definition at line 184 of file mh5hash.c.
void MHEG5ResetHashFile |
( |
U8BIT * |
url | ) |
|
Reset the state and clear cache of the hashfile associated with a content file.
- Parameters
-
- Returns
Definition at line 874 of file mh5hash.c.
void MHEG5ResetVerification |
( |
void |
| ) |
|
Reset the state of the verification subsystem.
Reset the entire state of the verification mechanism.
- Returns
- nothing
Definition at line 138 of file mh5hash.c.
void MHEG5SetVerificationCallback |
( |
void(*)(void) |
callback | ) |
|
Register a callback to be fired when the state of the verification file changes.
Register a callback to be fired when the state of the verification subsystem changes.
- Parameters
-
callback | Pointer to the callback function to be used. |
- Returns
Definition at line 128 of file mh5hash.c.