Lines Matching refs:mackey
66 MAC_KEY *mackey;
71 mackey = OPENSSL_zalloc(sizeof(*mackey));
72 if (mackey == NULL)
75 mackey->lock = CRYPTO_THREAD_lock_new();
76 if (mackey->lock == NULL) {
77 OPENSSL_free(mackey);
80 mackey->libctx = libctx;
81 mackey->refcnt = 1;
82 mackey->cmac = cmac;
84 return mackey;
87 void ossl_mac_key_free(MAC_KEY *mackey)
91 if (mackey == NULL)
94 CRYPTO_DOWN_REF(&mackey->refcnt, &ref, mackey->lock);
98 OPENSSL_secure_clear_free(mackey->priv_key, mackey->priv_key_len);
99 OPENSSL_free(mackey->properties);
100 ossl_prov_cipher_reset(&mackey->cipher);
101 CRYPTO_THREAD_lock_free(mackey->lock);
102 OPENSSL_free(mackey);
105 int ossl_mac_key_up_ref(MAC_KEY *mackey)
119 CRYPTO_UP_REF(&mackey->refcnt, &ref, mackey->lock);
133 static void mac_free(void *mackey)
135 ossl_mac_key_free(mackey);