From 7ed2f783b04bc6831ab7175ee8eaa850f288f9dc Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Thu, 9 Mar 2017 21:14:35 +0800 Subject: [PATCH] update commands --- apps/cpk.c | 11 ++++------- apps/otp.c | 12 +++--------- apps/progs.h | 5 +++++ apps/sm9.c | 12 +++++------- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/apps/cpk.c b/apps/cpk.c index 654f9338..1c797814 100644 --- a/apps/cpk.c +++ b/apps/cpk.c @@ -46,14 +46,11 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== */ - /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html + * gmssl cpk -help + * gmssl cpk -genmsk -out + * gmssl cpk -params -text + * gmssl cpk -genkey -in -id */ #include diff --git a/apps/otp.c b/apps/otp.c index 626a819f..fead2270 100644 --- a/apps/otp.c +++ b/apps/otp.c @@ -46,14 +46,9 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== */ - /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html + * gmssl otp -setup + * gmssl otp -genkey */ #include @@ -82,8 +77,7 @@ OPTIONS otp_options[] = { {NULL} }; - -int sm9_main(int argc, char **argv) +int otp_main(int argc, char **argv) { printf("otp not implemented\n"); return 0; diff --git a/apps/progs.h b/apps/progs.h index c835c96b..a7bd1305 100644 --- a/apps/progs.h +++ b/apps/progs.h @@ -65,6 +65,7 @@ extern int s_client_main(int argc, char *argv[]); extern int s_server_main(int argc, char *argv[]); extern int s_time_main(int argc, char *argv[]); extern int sess_id_main(int argc, char *argv[]); +extern int sm9_main(int argc, char *argv[]); extern int smime_main(int argc, char *argv[]); extern int speed_main(int argc, char *argv[]); extern int spkac_main(int argc, char *argv[]); @@ -115,6 +116,7 @@ extern OPTIONS s_client_options[]; extern OPTIONS s_server_options[]; extern OPTIONS s_time_options[]; extern OPTIONS sess_id_options[]; +extern OPTIONS sm9_options[]; extern OPTIONS smime_options[]; extern OPTIONS speed_options[]; extern OPTIONS spkac_options[]; @@ -201,6 +203,9 @@ static FUNCTION functions[] = { { FT_general, "s_time", s_time_main, s_time_options }, #endif { FT_general, "sess_id", sess_id_main, sess_id_options }, +#ifndef OPENSSL_NO_SM9 + { FT_general, "sm9", sm9_main, sm9_options }, +#endif { FT_general, "smime", smime_main, smime_options }, { FT_general, "speed", speed_main, speed_options }, { FT_general, "spkac", spkac_main, spkac_options }, diff --git a/apps/sm9.c b/apps/sm9.c index 536b1577..d93c01b6 100644 --- a/apps/sm9.c +++ b/apps/sm9.c @@ -46,14 +46,12 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== */ - /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html + * gmssl sm9 -setup + * gmssl sm9 -genkey + * gmssl sm9 -encrypt + * gmssl sm9 -sign + * gmssl sm9 -verify */ #include