aboutsummaryrefslogtreecommitdiffstats
path: root/openssl_missing.c
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2001-11-29 13:03:08 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2001-11-29 13:03:08 +0000
commit622142fe5f864ad3964a6f30ffe6af7361515e83 (patch)
tree3132d2cafa7c712ee6fff1fbd3e4e9c2fec4ae11 /openssl_missing.c
parenteec231c7350bda539d10564b723a124a7caeafa6 (diff)
downloadruby-openssl-history-622142fe5f864ad3964a6f30ffe6af7361515e83.tar.gz
* Make work under MS Windows (strptime added) + doc in README
Diffstat (limited to 'openssl_missing.c')
-rw-r--r--openssl_missing.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/openssl_missing.c b/openssl_missing.c
new file mode 100644
index 0000000..5d6c0eb
--- /dev/null
+++ b/openssl_missing.c
@@ -0,0 +1,27 @@
+/*
+ * $Id$
+ * 'OpenSSL for Ruby' project
+ * Copyright (C) 2001 Michal Rokos <m.rokos@sh.cvut.cz>
+ * All rights reserved.
+ */
+/*
+ * This program is licenced under the same licence as Ruby.
+ * (See the file 'LICENCE'.)
+ */
+#include <openssl/hmac.h>
+#include "openssl_missing.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;
+}
+