signing.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef CCN_SIGNING_DEFINED
00025 #define CCN_SIGNING_DEFINED
00026
00027 #include <stddef.h>
00028 #include <ccn/charbuf.h>
00029
00030
00031
00032
00033 struct ccn_sigc;
00034
00035
00036
00037
00038 struct ccn_pkey;
00039
00040
00041
00042
00043 struct ccn_signature;
00044
00045
00046
00047
00048 struct ccn_parsed_ContentObject;
00049
00050 struct ccn_sigc *ccn_sigc_create(void);
00051 int ccn_sigc_init(struct ccn_sigc *ctx, const char *digest);
00052 void ccn_sigc_destroy(struct ccn_sigc **);
00053 int ccn_sigc_update(struct ccn_sigc *ctx, const void *data, size_t size);
00054 int ccn_sigc_final(struct ccn_sigc *ctx, struct ccn_signature *signature, size_t *size, const struct ccn_pkey *priv_key);
00055 size_t ccn_sigc_signature_max_size(struct ccn_sigc *ctx, const struct ccn_pkey *priv_key);
00056 int ccn_verify_signature(const unsigned char *msg, size_t size, const struct ccn_parsed_ContentObject *co,
00057 const struct ccn_pkey *verification_pubkey);
00058 struct ccn_pkey *ccn_d2i_pubkey(const unsigned char *p, size_t size);
00059 void ccn_pubkey_free(struct ccn_pkey *i_pubkey);
00060 size_t ccn_pubkey_size(const struct ccn_pkey *i_pubkey);
00061
00062
00063
00064
00065
00066
00067 int ccn_append_pubkey_blob(struct ccn_charbuf *c, const struct ccn_pkey *i_pubkey);
00068
00069 #endif