diff options
| author | miod <> | 2014-11-09 19:17:13 +0000 |
|---|---|---|
| committer | miod <> | 2014-11-09 19:17:13 +0000 |
| commit | 35d7dd4666beda50f5094b8804802132fbe722ef (patch) | |
| tree | 8f4747a1df4b007feca32e262b38052339c686c1 /src/lib/libcrypto/err | |
| parent | d92e6fdf5aae7a320effa3de769ce4c0378485c4 (diff) | |
| download | openbsd-35d7dd4666beda50f5094b8804802132fbe722ef.tar.gz openbsd-35d7dd4666beda50f5094b8804802132fbe722ef.tar.bz2 openbsd-35d7dd4666beda50f5094b8804802132fbe722ef.zip | |
GOST crypto algorithms (well, most of them), ported from the removed GOST
engine to regular EVP citizens, contributed by Dmitry Eremin-Solenikov;
libcrypto bits only for now.
This is a verbatim import of Dmitry's work, and does not compile in this
state; the forthcoming commits will address these issues.
None of the GOST code is enabled in libcrypto yet, for it still gets
compiled with OPENSSL_NO_GOST defined. However, the public header gost.h
will be installed.
Diffstat (limited to 'src/lib/libcrypto/err')
| -rw-r--r-- | src/lib/libcrypto/err/err.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/err/err.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/err/err_all.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/err/openssl.ec | 1 |
4 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 75a1d0181e..f06320247c 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: err.c,v 1.40 2014/10/05 15:21:48 deraadt Exp $ */ | 1 | /* $OpenBSD: err.c,v 1.41 2014/11/09 19:17:13 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -157,6 +157,7 @@ static ERR_STRING_DATA ERR_str_libraries[] = { | |||
| 157 | {ERR_PACK(ERR_LIB_FIPS,0,0), "FIPS routines"}, | 157 | {ERR_PACK(ERR_LIB_FIPS,0,0), "FIPS routines"}, |
| 158 | {ERR_PACK(ERR_LIB_CMS,0,0), "CMS routines"}, | 158 | {ERR_PACK(ERR_LIB_CMS,0,0), "CMS routines"}, |
| 159 | {ERR_PACK(ERR_LIB_HMAC,0,0), "HMAC routines"}, | 159 | {ERR_PACK(ERR_LIB_HMAC,0,0), "HMAC routines"}, |
| 160 | {ERR_PACK(ERR_LIB_GOST,0,0), "GOST routines"}, | ||
| 160 | {0, NULL}, | 161 | {0, NULL}, |
| 161 | }; | 162 | }; |
| 162 | 163 | ||
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index ced340ea80..87bb96eec7 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: err.h,v 1.21 2014/07/11 09:25:24 jsing Exp $ */ | 1 | /* $OpenBSD: err.h,v 1.22 2014/11/09 19:17:13 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -195,6 +195,7 @@ typedef struct err_state_st { | |||
| 195 | #define ERR_LIB_TS 47 | 195 | #define ERR_LIB_TS 47 |
| 196 | #define ERR_LIB_HMAC 48 | 196 | #define ERR_LIB_HMAC 48 |
| 197 | #define ERR_LIB_JPAKE 49 | 197 | #define ERR_LIB_JPAKE 49 |
| 198 | #define ERR_LIB_GOST 50 | ||
| 198 | 199 | ||
| 199 | #define ERR_LIB_USER 128 | 200 | #define ERR_LIB_USER 128 |
| 200 | 201 | ||
| @@ -231,6 +232,7 @@ typedef struct err_state_st { | |||
| 231 | #define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__) | 232 | #define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__) |
| 232 | #define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__) | 233 | #define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__) |
| 233 | #define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__) | 234 | #define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__) |
| 235 | #define GOSTerr(f,r) ERR_PUT_error(ERR_LIB_GOST,(f),(r),__FILE__,__LINE__) | ||
| 234 | 236 | ||
| 235 | #define ERR_PACK(l,f,r) (((((unsigned long)l)&0xffL)<<24L)| \ | 237 | #define ERR_PACK(l,f,r) (((((unsigned long)l)&0xffL)<<24L)| \ |
| 236 | ((((unsigned long)f)&0xfffL)<<12L)| \ | 238 | ((((unsigned long)f)&0xfffL)<<12L)| \ |
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c index 7362220824..c880f1fbf3 100644 --- a/src/lib/libcrypto/err/err_all.c +++ b/src/lib/libcrypto/err/err_all.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: err_all.c,v 1.18 2014/10/18 17:08:32 jsing Exp $ */ | 1 | /* $OpenBSD: err_all.c,v 1.19 2014/11/09 19:17:13 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -105,6 +105,9 @@ | |||
| 105 | #ifndef OPENSSL_NO_RSA | 105 | #ifndef OPENSSL_NO_RSA |
| 106 | #include <openssl/rsa.h> | 106 | #include <openssl/rsa.h> |
| 107 | #endif | 107 | #endif |
| 108 | #ifndef OPENSSL_NO_GOST | ||
| 109 | #include <openssl/gost.h> | ||
| 110 | #endif | ||
| 108 | 111 | ||
| 109 | void | 112 | void |
| 110 | ERR_load_crypto_strings(void) | 113 | ERR_load_crypto_strings(void) |
| @@ -157,5 +160,8 @@ ERR_load_crypto_strings(void) | |||
| 157 | #ifndef OPENSSL_NO_CMS | 160 | #ifndef OPENSSL_NO_CMS |
| 158 | ERR_load_CMS_strings(); | 161 | ERR_load_CMS_strings(); |
| 159 | #endif | 162 | #endif |
| 163 | #ifndef OPENSSL_NO_GOST | ||
| 164 | ERR_load_GOST_strings(); | ||
| 165 | #endif | ||
| 160 | #endif | 166 | #endif |
| 161 | } | 167 | } |
diff --git a/src/lib/libcrypto/err/openssl.ec b/src/lib/libcrypto/err/openssl.ec index c513734e94..dcebbba6c4 100644 --- a/src/lib/libcrypto/err/openssl.ec +++ b/src/lib/libcrypto/err/openssl.ec | |||
| @@ -34,6 +34,7 @@ L STORE crypto/store/store.h crypto/store/str_err.c | |||
| 34 | L TS crypto/ts/ts.h crypto/ts/ts_err.c | 34 | L TS crypto/ts/ts.h crypto/ts/ts_err.c |
| 35 | L HMAC crypto/hmac/hmac.h crypto/hmac/hmac_err.c | 35 | L HMAC crypto/hmac/hmac.h crypto/hmac/hmac_err.c |
| 36 | L CMS crypto/cms/cms.h crypto/cms/cms_err.c | 36 | L CMS crypto/cms/cms.h crypto/cms/cms_err.c |
| 37 | L GOST crypto/gost/gost.h crypto/gost/gost_err.c | ||
| 37 | 38 | ||
| 38 | # additional header files to be scanned for function names | 39 | # additional header files to be scanned for function names |
| 39 | L NONE crypto/x509/x509_vfy.h NONE | 40 | L NONE crypto/x509/x509_vfy.h NONE |
