X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Finner.h;h=20211d7c351496afaf36eac70b0c36c15867767e;hp=5f596a1a0c527b17cb265acdd3bf3715097edcc6;hb=a0054ad8212ecf0f31608fee60cafb32fbde789d;hpb=d592e999329b4a661e5660d56e3226b73a2ad364 diff --git a/src/inner.h b/src/inner.h index 5f596a1..20211d7 100644 --- a/src/inner.h +++ b/src/inner.h @@ -85,7 +85,7 @@ * * The test on 'unsigned long' should already catch most cases, the one * notable exception being Windows code where 'unsigned long' is kept to - * 32-bit for compatbility with all the legacy code that liberally uses + * 32-bit for compatibility with all the legacy code that liberally uses * the 'DWORD' type for 32-bit values. * * Macro names are taken from: http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros @@ -2147,6 +2147,34 @@ void br_ssl_engine_switch_chapol_in(br_ssl_engine_context *cc, void br_ssl_engine_switch_chapol_out(br_ssl_engine_context *cc, int is_client, int prf_id); +/* + * Switch to CCM decryption for incoming records. + * cc the engine context + * is_client non-zero for a client, zero for a server + * prf_id id of hash function for PRF + * bc_impl block cipher implementation (CTR+CBC) + * cipher_key_len block cipher key length (in bytes) + * tag_len tag length (in bytes) + */ +void br_ssl_engine_switch_ccm_in(br_ssl_engine_context *cc, + int is_client, int prf_id, + const br_block_ctrcbc_class *bc_impl, + size_t cipher_key_len, size_t tag_len); + +/* + * Switch to GCM encryption for outgoing records. + * cc the engine context + * is_client non-zero for a client, zero for a server + * prf_id id of hash function for PRF + * bc_impl block cipher implementation (CTR+CBC) + * cipher_key_len block cipher key length (in bytes) + * tag_len tag length (in bytes) + */ +void br_ssl_engine_switch_ccm_out(br_ssl_engine_context *cc, + int is_client, int prf_id, + const br_block_ctrcbc_class *bc_impl, + size_t cipher_key_len, size_t tag_len); + /* * Calls to T0-generated code. */