| /optee_os/core/lib/libtomcrypt/src/math/ |
| H A D | ltm_desc.c | 46 LTC_ARGCHK(a != NULL); in init_mpi() 49 if (*a == NULL) { in init_mpi() 60 LTC_ARGCHK(a != NULL); in init() 73 LTC_ARGCHKVD(a != NULL); in deinit() 80 LTC_ARGCHK(a != NULL); in neg() 81 LTC_ARGCHK(b != NULL); in neg() 87 LTC_ARGCHK(a != NULL); in copy() 88 LTC_ARGCHK(b != NULL); in copy() 95 LTC_ARGCHK(a != NULL); in init_copy() 96 LTC_ARGCHK(b != NULL); in init_copy() [all …]
|
| H A D | gmp_desc.c | 14 LTC_ARGCHK(a != NULL); in init() 17 if (*a == NULL) { in init() 26 LTC_ARGCHKVD(a != NULL); in deinit() 33 LTC_ARGCHK(a != NULL); in neg() 34 LTC_ARGCHK(b != NULL); in neg() 41 LTC_ARGCHK(a != NULL); in copy() 42 LTC_ARGCHK(b != NULL); in copy() 58 LTC_ARGCHK(a != NULL); in set_int() 65 LTC_ARGCHK(a != NULL); in get_int() 71 LTC_ARGCHK(a != NULL); in get_digit() [all …]
|
| H A D | tfm_desc.c | 38 LTC_ARGCHK(a != NULL); in init() 41 if (*a == NULL) { in init() 50 LTC_ARGCHKVD(a != NULL); in deinit() 56 LTC_ARGCHK(a != NULL); in neg() 57 LTC_ARGCHK(b != NULL); in neg() 64 LTC_ARGCHK(a != NULL); in copy() 65 LTC_ARGCHK(b != NULL); in copy() 81 LTC_ARGCHK(a != NULL); in set_int() 89 LTC_ARGCHK(a != NULL); in get_int() 97 LTC_ARGCHK(a != NULL); in get_digit() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
| H A D | ecc_find_curve.c | 14 "1.3.132.0.6", { "SECP112R1", "ECC-112", NULL } 19 "1.3.132.0.7", { "SECP112R2", NULL } 24 "1.3.132.0.28", { "SECP128R1", "ECC-128", NULL } 29 "1.3.132.0.29", { "SECP128R2", NULL } 34 "1.3.132.0.8", { "SECP160R1", "ECC-160", NULL } 39 "1.3.132.0.30", { "SECP160R2", NULL } 44 "1.3.132.0.9", { "SECP160K1", NULL } 49 "1.2.840.10045.3.1.1", { "SECP192R1", "NISTP192", "PRIME192V1", "ECC-192", "P-192", NULL } 54 "1.2.840.10045.3.1.2", { "PRIME192V2", NULL } 59 "1.2.840.10045.3.1.3", { "PRIME192V3", NULL } [all …]
|
| H A D | ecc_encrypt_key.c | 35 LTC_ARGCHK(in != NULL); in ecc_encrypt_key() 36 LTC_ARGCHK(out != NULL); in ecc_encrypt_key() 37 LTC_ARGCHK(outlen != NULL); in ecc_encrypt_key() 38 LTC_ARGCHK(key != NULL); in ecc_encrypt_key() 55 if (pub_expt == NULL || ecc_shared == NULL || skey == NULL) { in ecc_encrypt_key() 56 if (pub_expt != NULL) { in ecc_encrypt_key() 59 if (ecc_shared != NULL) { in ecc_encrypt_key() 62 if (skey != NULL) { in ecc_encrypt_key() 70 if (ltc_mp.sqrtmod_prime != NULL) { in ecc_encrypt_key() 103 … LTC_ASN1_EOL, 0UL, NULL); in ecc_encrypt_key()
|
| /optee_os/core/lib/libtomcrypt/src/ciphers/safer/ |
| H A D | safer.c | 39 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 51 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 63 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 75 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 176 LTC_ARGCHK(key != NULL); in safer_k64_setup() 177 LTC_ARGCHK(skey != NULL); in safer_k64_setup() 193 LTC_ARGCHK(key != NULL); in safer_sk64_setup() 194 LTC_ARGCHK(skey != NULL); in safer_sk64_setup() 210 LTC_ARGCHK(key != NULL); in safer_k128_setup() 211 LTC_ARGCHK(skey != NULL); in safer_k128_setup() [all …]
|
| /optee_os/core/kernel/ |
| H A D | lockdep.c | 27 struct lockdep_node *node = NULL; in lockdep_add_to_graph() 36 return NULL; in lockdep_add_to_graph() 47 vaddr_t *nstack = NULL; in dup_call_stack() 51 return NULL; in dup_call_stack() 58 return NULL; in dup_call_stack() 67 vaddr_t *p = NULL; in lockdep_print_call_stack() 83 struct lockdep_edge *edge = NULL; in lockdep_add_edge() 112 struct lockdep_bfs *cur = NULL; in lockdep_bfs_queue_delete() 113 struct lockdep_bfs *next = NULL; in lockdep_bfs_queue_delete() 131 struct lockdep_bfs *qe = NULL; in lockdep_graph_get_shortest_cycle() [all …]
|
| H A D | dt_driver.c | 28 * @dt_drv: Matching driver to probe if found or NULL 29 * @dm: Matching reference if applicable or NULL 130 struct dt_driver_provider *prv = NULL; in dt_driver_register_provider() 139 provider_cells, fdt_get_name(fdt, nodeoffset, NULL)); in dt_driver_register_provider() 146 fdt_get_name(fdt, nodeoffset, NULL)); in dt_driver_register_provider() 184 const char *cells_name = NULL; in fdt_get_dt_driver_cells() 185 const fdt32_t *c = NULL; in fdt_get_dt_driver_cells() 237 struct dt_driver_provider *prv = NULL; in dt_driver_get_provider_by_node() 243 return NULL; in dt_driver_get_provider_by_node() 249 struct dt_driver_provider *prv = NULL; in dt_driver_get_provider_by_phandle() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | cipher_wrap.c | 127 if (ctx != NULL) { in gcm_ctx_alloc() 154 if (ctx != NULL) { in ccm_ctx_alloc() 263 if (aes == NULL) { in aes_ctx_alloc() 264 return NULL; in aes_ctx_alloc() 299 NULL, 302 NULL, 515 if (xts_ctx != NULL) { in xts_aes_ctx_alloc() 526 if (xts_ctx == NULL) { in xts_aes_ctx_free() 536 NULL, 538 NULL, [all …]
|
| H A D | memory_buffer_alloc.c | 98 while (cur != NULL) { in debug_chain() 106 while (cur != NULL) { in debug_chain() 136 if (hdr->prev != NULL && hdr->prev == hdr->next) { in verify_header() 143 if (hdr->prev_free != NULL && hdr->prev_free == hdr->next_free) { in verify_header() 157 if (prv == NULL || verify_header(prv) != 0) { in verify_chain() 165 if (heap.first->prev != NULL) { in verify_chain() 168 "first->prev != NULL\n"); in verify_chain() 175 while (cur != NULL) { in verify_chain() 210 if (heap.buf == NULL || heap.first == NULL) { in buffer_alloc_calloc() 211 return NULL; in buffer_alloc_calloc() [all …]
|
| H A D | ssl_cache.c | 44 mbedtls_time_t t = mbedtls_time(NULL); in ssl_cache_find_entry() 48 for (cur = cache->chain; cur != NULL; cur = cur->next) { in ssl_cache_find_entry() 65 if (cur != NULL) { in ssl_cache_find_entry() 116 if (entry == NULL) { in ssl_cache_entry_zeroize() 121 if (entry->session != NULL) { in ssl_cache_entry_zeroize() 136 mbedtls_time_t t = mbedtls_time(NULL), oldest = 0; in ssl_cache_pick_writing_slot() 139 mbedtls_ssl_cache_entry *old = NULL; in ssl_cache_pick_writing_slot() 151 last = NULL; in ssl_cache_pick_writing_slot() 152 for (cur = cache->chain; cur != NULL; cur = cur->next) { in ssl_cache_pick_writing_slot() 169 for (cur = cache->chain; cur != NULL; cur = cur->next) { in ssl_cache_pick_writing_slot() [all …]
|
| H A D | ecdsa.c | 60 if (ctx == NULL) { in ecdsa_restart_ver_free() 102 if (ctx == NULL) { in ecdsa_restart_sig_free() 136 if (ctx == NULL) { in ecdsa_restart_det_free() 146 #define ECDSA_RS_ECP (rs_ctx == NULL ? NULL : &rs_ctx->ecp) 155 if (rs_ctx != NULL && rs_ctx->ecp.depth++ == 0) \ 160 rs_ctx != NULL && rs_ctx->SUB == NULL) \ 163 if (rs_ctx->SUB == NULL) \ 173 if (rs_ctx != NULL && rs_ctx->SUB != NULL && \ 178 rs_ctx->SUB = NULL; \ 181 if (rs_ctx != NULL) \ [all …]
|
| H A D | md.c | 25 * (behaviour with NULL arguments) depending on whether MD_C is defined or 187 return NULL; in mbedtls_md_info_from_type() 263 if (ctx == NULL || ctx->md_info == NULL) { in mbedtls_md_free() 267 if (ctx->md_ctx != NULL) { in mbedtls_md_free() 325 if (ctx->hmac_ctx != NULL) { in mbedtls_md_free() 337 if (dst == NULL || dst->md_info == NULL || in mbedtls_md_clone() 338 src == NULL || src->md_info == NULL || in mbedtls_md_clone() 406 if (dst->hmac_ctx != NULL && src->hmac_ctx != NULL) in mbedtls_md_clone() 415 if (ctx->md_ctx == NULL) \ 424 if (ctx == NULL) { in mbedtls_md_setup() [all …]
|
| H A D | psa_crypto_core_common.h | 17 * function also accepts an offset of 0 into a buffer whose pointer is null. 18 * (`p + n` has undefined behavior when `p` is null, even when `n == 0`. 19 * A null pointer is a valid buffer pointer when the size is 0, for example 23 * This may be \p NULL if \p n is zero. 32 return p == NULL ? NULL : p + n; in psa_crypto_buffer_offset() 40 * This may be \p NULL if \p n is zero. 49 return p == NULL ? NULL : p + n; in psa_crypto_buffer_offset_const()
|
| /optee_os/core/lib/libtomcrypt/src/ciphers/aes/ |
| H A D | aes_desc.c | 29 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 45 AES_SETUP, AES_ENC, NULL, NULL, AES_DONE, AES_KS, 46 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 236 LTC_ARGCHK(keysize != NULL); in AES_KS()
|
| /optee_os/core/mm/ |
| H A D | tee_mm.c | 21 if (pool == NULL) in tee_mm_init() 37 pool->entry = malloc_flags(pool->flags | MAF_ZERO_INIT, NULL, in tee_mm_init() 40 if (pool->entry == NULL) in tee_mm_init() 54 if (pool == NULL || pool->entry == NULL) in tee_mm_final() 57 while (pool->entry->next != NULL) in tee_mm_final() 60 pool->entry = NULL; in tee_mm_final() 126 tee_mm_entry_t *entry = NULL; in tee_mm_alloc_flags() 127 tee_mm_entry_t *nn = NULL; in tee_mm_alloc_flags() 133 return NULL; in tee_mm_alloc_flags() 137 nn = malloc_flags(flags, NULL, MALLOC_DEFAULT_ALIGNMENT, in tee_mm_alloc_flags() [all …]
|
| /optee_os/lib/libmbedtls/core/ |
| H A D | bignum.c | 21 assert(a != NULL); in crypto_bignum_num_bytes() 27 assert(a != NULL); in crypto_bignum_num_bits() 35 assert(a != NULL); in crypto_bignum_compare() 36 assert(b != NULL); in crypto_bignum_compare() 46 assert(from != NULL); in crypto_bignum_bn2bin() 47 assert(to != NULL); in crypto_bignum_bn2bin() 56 assert(from != NULL); in crypto_bignum_bin2bn() 57 assert(to != NULL); in crypto_bignum_bin2bn() 65 assert(from != NULL); in crypto_bignum_copy() 66 assert(to != NULL); in crypto_bignum_copy() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/ciphers/ |
| H A D | tea.c | 23 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 31 LTC_ARGCHK(key != NULL); in tea_setup() 32 LTC_ARGCHK(skey != NULL); in tea_setup() 65 LTC_ARGCHK(pt != NULL); in tea_ecb_encrypt() 66 LTC_ARGCHK(ct != NULL); in tea_ecb_encrypt() 67 LTC_ARGCHK(skey != NULL); in tea_ecb_encrypt() 94 LTC_ARGCHK(pt != NULL); in tea_ecb_decrypt() 95 LTC_ARGCHK(ct != NULL); in tea_ecb_decrypt() 96 LTC_ARGCHK(skey != NULL); in tea_ecb_decrypt() 200 LTC_ARGCHK(keysize != NULL); in tea_keysize()
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | sec_hmac.c | 21 struct crypto_hmac *hash = NULL; in sec_hmac_initialize() 22 struct hashctx *hash_ctx = NULL; in sec_hmac_initialize() 25 EMSG("Input ctx is NULL"); in sec_hmac_initialize() 38 struct crypto_hmac *hash = NULL; in sec_hmac_do_update() 39 struct hashctx *hashctx = NULL; in sec_hmac_do_update() 68 struct crypto_hmac *hash = NULL; in sec_hmac_ctx_free() 69 struct hashctx *hash_ctx = NULL; in sec_hmac_ctx_free() 82 hash->ctx = NULL; in sec_hmac_ctx_free() 90 struct crypto_hmac *out_hash = NULL; in sec_hmac_copy_state() 91 struct crypto_hmac *in_hash = NULL; in sec_hmac_copy_state() [all …]
|
| /optee_os/core/tee/ |
| H A D | tee_svc_storage.c | 60 if (e == NULL || utc == NULL) in tee_svc_close_enum() 68 e->dir = NULL; in tee_svc_close_enum() 69 e->fops = NULL; in tee_svc_close_enum() 89 void *attr = NULL; in tee_svc_storage_read_head() 100 res = fops->read(o->fh, 0, &head, NULL, &bytes); in tee_svc_storage_read_head() 137 attr, NULL, &bytes); in tee_svc_storage_read_head() 176 struct tee_pobj *po = NULL; in syscall_storage_obj_open() 177 struct tee_obj *o = NULL; in syscall_storage_obj_open() 178 void *oid_bbuf = NULL; in syscall_storage_obj_open() 205 if (o == NULL) { in syscall_storage_obj_open() [all …]
|
| /optee_os/core/lib/libtomcrypt/ |
| H A D | sm2-dsa.c | 26 ecc_point *x1y1p = NULL; in sm2_ltc_dsa_sign() 29 void *k = NULL; in sm2_ltc_dsa_sign() 30 void *e = NULL; in sm2_ltc_dsa_sign() 31 void *r = NULL; in sm2_ltc_dsa_sign() 32 void *s = NULL; in sm2_ltc_dsa_sign() 33 void *tmp = NULL; in sm2_ltc_dsa_sign() 40 ltc_res = mp_init_multi(&k, &e, &r, &s, &tmp, NULL); in sm2_ltc_dsa_sign() 50 res = ecc_populate_ltc_private_key(<c_key, key, algo, NULL); in sm2_ltc_dsa_sign() 62 ltc_res = rand_bn_upto(k, ltc_key.dp.order, NULL, in sm2_ltc_dsa_sign() 132 mp_clear_multi(k, e, r, s, tmp, NULL); in sm2_ltc_dsa_sign() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/rsa/ |
| H A D | rsa_set.c | 15 @param d RSA's d (only private key, NULL for public key) 27 LTC_ARGCHK(key != NULL); in rsa_set_key() 28 LTC_ARGCHK(N != NULL); in rsa_set_key() 29 LTC_ARGCHK(e != NULL); in rsa_set_key() 30 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_set_key() 68 LTC_ARGCHK(key != NULL); in rsa_set_factors() 69 LTC_ARGCHK(p != NULL); in rsa_set_factors() 70 LTC_ARGCHK(q != NULL); in rsa_set_factors() 71 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_set_factors() 105 LTC_ARGCHK(key != NULL); in rsa_set_crt_params() [all …]
|
| /optee_os/ta/pkcs11/src/ |
| H A D | processing.c | 128 session->processing = NULL; in release_active_processing() 133 void *a_ptr = NULL; in get_object_key_bit_size() 146 if (get_attribute_ptr(attrs, PKCS11_CKA_VALUE, NULL, &a_size)) in get_object_key_bit_size() 151 if (get_attribute_ptr(attrs, PKCS11_CKA_MODULUS, NULL, &a_size)) in get_object_key_bit_size() 162 if (get_attribute_ptr(attrs, PKCS11_CKA_EC_POINT, NULL, in get_object_key_bit_size() 178 void *value = NULL; in generate_random_key_value() 179 void *data = NULL; in generate_random_key_value() 225 struct pkcs11_session *session = NULL; in entry_generate_secret() 226 struct pkcs11_attribute_head *proc_params = NULL; in entry_generate_secret() 227 struct obj_attrs *head = NULL; in entry_generate_secret() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/x509/ |
| H A D | x509_decode_public_key_from_certificate.c | 13 #define LOOKS_LIKE_SPKI(l) ((l) != NULL) \ 15 && ((l)->child != NULL) \ 17 && ((l)->next != NULL) \ 40 ltc_asn1_list *decoded_list = NULL, *l; in x509_decode_public_key_from_certificate() 42 LTC_ARGCHK(in != NULL); in x509_decode_public_key_from_certificate() 44 LTC_ARGCHK(callback != NULL); in x509_decode_public_key_from_certificate() 48 if (tmpbuf == NULL) { in x509_decode_public_key_from_certificate() 64 if ((l->type == LTC_ASN1_SEQUENCE) && (l->child != NULL)) { in x509_decode_public_key_from_certificate() 66 if ((l->type == LTC_ASN1_SEQUENCE) && (l->child != NULL)) { in x509_decode_public_key_from_certificate() 74 NULL in x509_decode_public_key_from_certificate() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/dsa/ |
| H A D | dsa_set.c | 26 LTC_ARGCHK(p != NULL); in dsa_set_pqg() 27 LTC_ARGCHK(q != NULL); in dsa_set_pqg() 28 LTC_ARGCHK(g != NULL); in dsa_set_pqg() 29 LTC_ARGCHK(key != NULL); in dsa_set_pqg() 30 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_set_pqg() 71 LTC_ARGCHK(key != NULL); in dsa_set_key() 72 LTC_ARGCHK(key->x != NULL); in dsa_set_key() 73 LTC_ARGCHK(key->y != NULL); in dsa_set_key() 74 LTC_ARGCHK(key->p != NULL); in dsa_set_key() 75 LTC_ARGCHK(key->g != NULL); in dsa_set_key() [all …]
|