Lines Matching refs:mackey
66 MAC_KEY *mackey; in ossl_mac_key_new() local
71 mackey = OPENSSL_zalloc(sizeof(*mackey)); in ossl_mac_key_new()
72 if (mackey == NULL) in ossl_mac_key_new()
75 if (!CRYPTO_NEW_REF(&mackey->refcnt, 1)) { in ossl_mac_key_new()
76 OPENSSL_free(mackey); in ossl_mac_key_new()
79 mackey->libctx = libctx; in ossl_mac_key_new()
80 mackey->cmac = cmac; in ossl_mac_key_new()
82 return mackey; in ossl_mac_key_new()
85 void ossl_mac_key_free(MAC_KEY *mackey) in ossl_mac_key_free() argument
89 if (mackey == NULL) in ossl_mac_key_free()
92 CRYPTO_DOWN_REF(&mackey->refcnt, &ref); in ossl_mac_key_free()
96 OPENSSL_secure_clear_free(mackey->priv_key, mackey->priv_key_len); in ossl_mac_key_free()
97 OPENSSL_free(mackey->properties); in ossl_mac_key_free()
98 ossl_prov_cipher_reset(&mackey->cipher); in ossl_mac_key_free()
99 CRYPTO_FREE_REF(&mackey->refcnt); in ossl_mac_key_free()
100 OPENSSL_free(mackey); in ossl_mac_key_free()
103 int ossl_mac_key_up_ref(MAC_KEY *mackey) in ossl_mac_key_up_ref() argument
117 CRYPTO_UP_REF(&mackey->refcnt, &ref); in ossl_mac_key_up_ref()
131 static void mac_free(void *mackey) in mac_free() argument
133 ossl_mac_key_free(mackey); in mac_free()