summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2019-03-17 17:46:00 +0000
committertb <>2019-03-17 17:46:00 +0000
commit9367fc7916e35f66272dbc483348265c31bf6372 (patch)
tree7f40e843bcfe29a72eafe115f439917246e95bee
parentc8acd603ab3f519a4bfe159fe808dc94fb3d7b1d (diff)
downloadopenbsd-9367fc7916e35f66272dbc483348265c31bf6372.tar.gz
openbsd-9367fc7916e35f66272dbc483348265c31bf6372.tar.bz2
openbsd-9367fc7916e35f66272dbc483348265c31bf6372.zip
Add the SM4 block cipher from the Chinese standard GB/T 32907-2016.
Patch from Daniel Wyatt ok inoguchi, jsing
-rw-r--r--src/usr.bin/openssl/openssl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c
index 92ecb1db3b..dbd15c80a8 100644
--- a/src/usr.bin/openssl/openssl.c
+++ b/src/usr.bin/openssl/openssl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: openssl.c,v 1.28 2018/11/11 07:10:57 tb Exp $ */ 1/* $OpenBSD: openssl.c,v 1.29 2019/03/17 17:46:00 tb 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 *
@@ -322,6 +322,13 @@ FUNCTION functions[] = {
322 { FUNC_TYPE_CIPHER, "rc4", enc_main }, 322 { FUNC_TYPE_CIPHER, "rc4", enc_main },
323 { FUNC_TYPE_CIPHER, "rc4-40", enc_main }, 323 { FUNC_TYPE_CIPHER, "rc4-40", enc_main },
324#endif 324#endif
325#ifndef OPENSSL_NO_SM4
326 { FUNC_TYPE_CIPHER, "sm4", enc_main },
327 { FUNC_TYPE_CIPHER, "sm4-ecb", enc_main },
328 { FUNC_TYPE_CIPHER, "sm4-cbc", enc_main },
329 { FUNC_TYPE_CIPHER, "sm4-ofb", enc_main },
330 { FUNC_TYPE_CIPHER, "sm4-cfb", enc_main },
331#endif
325#ifdef ZLIB 332#ifdef ZLIB
326 { FUNC_TYPE_CIPHER, "zlib", enc_main }, 333 { FUNC_TYPE_CIPHER, "zlib", enc_main },
327#endif 334#endif