Lines Matching refs:sctx
29 static int sct_ctx_update(EVP_MD_CTX *ctx, const SCT_CTX *sctx, const SCT *sct) in sct_ctx_update() argument
49 if (sct->entry_type == CT_LOG_ENTRY_TYPE_PRECERT && sctx->ihash == NULL) in sct_ctx_update()
62 der = sctx->certder; in sct_ctx_update()
63 derlen = sctx->certderlen; in sct_ctx_update()
65 if (!EVP_DigestUpdate(ctx, sctx->ihash, sctx->ihashlen)) in sct_ctx_update()
67 der = sctx->preder; in sct_ctx_update()
68 derlen = sctx->prederlen; in sct_ctx_update()
96 int SCT_CTX_verify(const SCT_CTX *sctx, const SCT *sct) in SCT_CTX_verify() argument
101 if (!SCT_is_complete(sct) || sctx->pkey == NULL || in SCT_CTX_verify()
103 (sct->entry_type == CT_LOG_ENTRY_TYPE_PRECERT && sctx->ihash == NULL)) { in SCT_CTX_verify()
111 if (sct->log_id_len != sctx->pkeyhashlen || in SCT_CTX_verify()
112 memcmp(sct->log_id, sctx->pkeyhash, sctx->pkeyhashlen) != 0) { in SCT_CTX_verify()
116 if (sct->timestamp > sctx->epoch_time_in_ms) { in SCT_CTX_verify()
125 if (!EVP_DigestVerifyInit_ex(ctx, NULL, "SHA2-256", sctx->libctx, in SCT_CTX_verify()
126 sctx->propq, sctx->pkey, NULL)) in SCT_CTX_verify()
129 if (!sct_ctx_update(ctx, sctx, sct)) in SCT_CTX_verify()