aboutsummaryrefslogtreecommitdiffstats
path: root/openssl_missing.c
blob: 4ab85aa3241c98f96348d2f31aaf7a29c2cdca5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * $Id$
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(NO_HMAC) && !defined(OPENSSL_NO_HMAC)

#include <string.h>
#include <openssl/hmac.h>

/* to hmac.[ch] */
int
HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
{
	if (in == NULL) {
        	/* HMACerr(HMAC_CTX_COPY,HMAC_R_INPUT_NOT_INITIALIZED); */
        	return 0;
    	}
	memcpy(out, in, sizeof(HMAC_CTX));

	return 1;
}

#endif /* NO_HMAC */