Blame crypto/evp/m_null.c
|
Packit Service |
084de1 |
/*
|
|
Packit Service |
084de1 |
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
Packit Service |
084de1 |
*
|
|
Packit Service |
084de1 |
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
Packit Service |
084de1 |
* this file except in compliance with the License. You can obtain a copy
|
|
Packit Service |
084de1 |
* in the file LICENSE in the source distribution or at
|
|
Packit Service |
084de1 |
* https://www.openssl.org/source/license.html
|
|
Packit Service |
084de1 |
*/
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
#include <stdio.h>
|
|
Packit Service |
084de1 |
#include "internal/cryptlib.h"
|
|
Packit Service |
084de1 |
#include <openssl/evp.h>
|
|
Packit Service |
084de1 |
#include <openssl/objects.h>
|
|
Packit Service |
084de1 |
#include <openssl/x509.h>
|
|
Packit Service |
084de1 |
#include "crypto/evp.h"
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
static int init(EVP_MD_CTX *ctx)
|
|
Packit Service |
084de1 |
{
|
|
Packit Service |
084de1 |
return 1;
|
|
Packit Service |
084de1 |
}
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
|
|
Packit Service |
084de1 |
{
|
|
Packit Service |
084de1 |
return 1;
|
|
Packit Service |
084de1 |
}
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
static int final(EVP_MD_CTX *ctx, unsigned char *md)
|
|
Packit Service |
084de1 |
{
|
|
Packit Service |
084de1 |
return 1;
|
|
Packit Service |
084de1 |
}
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
static const EVP_MD null_md = {
|
|
Packit Service |
084de1 |
NID_undef,
|
|
Packit Service |
084de1 |
NID_undef,
|
|
Packit Service |
084de1 |
0,
|
|
Packit Service |
084de1 |
0,
|
|
Packit Service |
084de1 |
init,
|
|
Packit Service |
084de1 |
update,
|
|
Packit Service |
084de1 |
final,
|
|
Packit Service |
084de1 |
NULL,
|
|
Packit Service |
084de1 |
NULL,
|
|
Packit Service |
084de1 |
0,
|
|
Packit Service |
084de1 |
sizeof(EVP_MD *),
|
|
Packit Service |
084de1 |
};
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
const EVP_MD *EVP_md_null(void)
|
|
Packit Service |
084de1 |
{
|
|
Packit Service |
084de1 |
return &null_md;
|
|
Packit Service |
084de1 |
}
|