Home
last modified time | relevance | path

Searched refs:ctx_ (Results 1 – 13 of 13) sorted by relevance

/system/update_engine/common/
Dhash_calculator.cc31 valid_ = (SHA256_Init(&ctx_) == 1); in HashCalculator()
42 TEST_AND_RETURN_FALSE(SHA256_Update(&ctx_, data, length) == 1); in Update()
79 TEST_AND_RETURN_FALSE(SHA256_Final(raw_hash_.data(), &ctx_) == 1); in Finalize()
114 return string(reinterpret_cast<const char*>(&ctx_), sizeof(ctx_)); in GetContext()
118 TEST_AND_RETURN_FALSE(context.size() == sizeof(ctx_)); in SetContext()
119 memcpy(&ctx_, context.data(), sizeof(ctx_)); in SetContext()
Dhash_calculator.h88 SHA256_CTX ctx_; variable
/system/keymaster/km_openssl/
Dhmac_operation.cpp93 HMAC_CTX_init(&ctx_); in HmacOperation()
135 HMAC_Init_ex(&ctx_, blob.key_material, blob.key_material_size, md, nullptr /* engine */); in HmacOperation()
139 HMAC_CTX_cleanup(&ctx_); in ~HmacOperation()
154 if (!HMAC_Update(&ctx_, input.peek_read(), input.available_read())) in Update()
172 if (!HMAC_Final(&ctx_, digest, &digest_len)) return TranslateLastOpenSslError(); in Finish()
Dblock_cipher_operation.cpp152 EVP_CIPHER_CTX_init(&ctx_); in BlockCipherEvpOperation()
156 EVP_CIPHER_CTX_cleanup(&ctx_); in ~BlockCipherEvpOperation()
198 if (!EVP_CipherFinal_ex(&ctx_, output->peek_write(), &output_written)) { in Finish()
231 if (!EVP_CipherInit_ex(&ctx_, cipher, nullptr /* engine */, key.key_material, iv_.data, in InitializeCipher()
238 EVP_CIPHER_CTX_set_padding(&ctx_, 0 /* disable padding */); in InitializeCipher()
327 if (EVP_CipherUpdate(&ctx_, nullptr /* out */, &output_written, aad_block_buf_.get(), in ProcessBufferedAadBlock()
339 if (EVP_CipherUpdate(&ctx_, nullptr /* out */, &output_written, data, in ProcessAadBlocks()
372 if (!EVP_CipherUpdate(&ctx_, output->peek_write(), &output_written, input, input_length)) { in InternalUpdate()
432 if (!EVP_CIPHER_CTX_ctrl(&ctx_, EVP_CTRL_GCM_GET_TAG, tag_length_, output->peek_write())) in Finish()
538 !EVP_CIPHER_CTX_ctrl(&ctx_, EVP_CTRL_GCM_SET_TAG, tag_length_, tag_buf_.get())) { in Finish()
Dsoft_keymaster_enforcement.cpp43 EvpMdCtx() { EVP_MD_CTX_init(&ctx_); } in EvpMdCtx()
44 ~EvpMdCtx() { EVP_MD_CTX_cleanup(&ctx_); } in ~EvpMdCtx()
46 EVP_MD_CTX* get() { return &ctx_; } in get()
49 EVP_MD_CTX ctx_; member in keymaster::__anon3cf081800111::EvpMdCtx
Dhmac_operation.h44 HMAC_CTX ctx_;
Dblock_cipher_operation.h104 EVP_CIPHER_CTX ctx_; variable
/system/keymaster/key_blob_utils/
Docb_utils.cpp36 AeCtx() : ctx_(ae_allocate(nullptr)) {} in AeCtx()
38 ae_clear(ctx_); in ~AeCtx()
39 ae_free(ctx_); in ~AeCtx()
42 ae_ctx* get() { return ctx_; } in get()
45 ae_ctx* ctx_; member in keymaster::AeCtx
Dintegrity_assured_key_blob.cpp44 explicit HmacCleanup(HMAC_CTX* ctx) : ctx_(ctx) {} in HmacCleanup()
45 ~HmacCleanup() { HMAC_CTX_cleanup(ctx_); } in ~HmacCleanup()
48 HMAC_CTX* ctx_; member in keymaster::HmacCleanup
/system/keymaster/include/keymaster/km_openssl/
Dopenssl_utils.h38 explicit EvpMdCtxCleaner(EVP_MD_CTX* ctx) : ctx_(ctx) {} in EvpMdCtxCleaner()
39 ~EvpMdCtxCleaner() { EVP_MD_CTX_cleanup(ctx_); } in ~EvpMdCtxCleaner()
42 EVP_MD_CTX* ctx_;
/system/netd/resolv/dns_responder/
Ddns_tls_frontend.cpp149 ctx_.reset(SSL_CTX_new(TLS_server_method())); in startServer()
150 if (!ctx_) { in startServer()
155 SSL_CTX_set_ecdh_auto(ctx_.get(), 1); in startServer()
169 if (SSL_CTX_use_certificate(ctx_.get(), certs[0].get()) <= 0) { in startServer()
173 if (SSL_CTX_use_PrivateKey(ctx_.get(), keys[0].get()) <= 0 ) { in startServer()
178 if (SSL_CTX_add1_chain_cert(ctx_.get(), certs[i].get()) != 1) { in startServer()
300 bssl::UniquePtr<SSL> ssl(SSL_new(ctx_.get())); in requestHandler()
381 ctx_.reset(); in stopServer()
Ddns_tls_frontend.h83 bssl::UniquePtr<SSL_CTX> ctx_; variable
/system/security/keystore/
Dkeymaster_enforcement.cpp365 EvpMdCtx() { EVP_MD_CTX_init(&ctx_); } in EvpMdCtx()
366 ~EvpMdCtx() { EVP_MD_CTX_cleanup(&ctx_); } in ~EvpMdCtx()
368 EVP_MD_CTX* get() { return &ctx_; } in get()
371 EVP_MD_CTX ctx_; member in keystore::EvpMdCtx