Skip to content

Commit

Permalink
Create the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdeliang committed Aug 4, 2016
1 parent f31aed8 commit d0afa26
Show file tree
Hide file tree
Showing 13 changed files with 3,435 additions and 1 deletion.
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
CC = gcc
CFLAG = -c -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g
#CFLAG += -DSHOW_DEBUG_PUB
#CFLAG += -DSHOW_DEBUG_SM3
#CFLAG += -DSHOW_DEBUG_ECS
#CFLAG += -DSHOW_DEBUG_ECH
#CFLAG += -DSHOW_DEBUG_ECE
TARGET = test
#INC_DIR = -I ~/openssl/soft/include
#LD_DIR = -L ~/openssl/soft/lib
SRC_DIR = .
LD_FILE = -lcrypto

SRCS = $(notdir $(wildcard $(SRC_DIR)/*.c))

OBJS = $(patsubst %.c, %.o, $(SRCS))

%.o: $(join $(SRC_DIR)/, %.c)
$(CC) -c $(CFLAG) $< -o $@ $(INC_DIR) $(LD_DIR)

all: dclean $(OBJS)
$(CC) -o $(TARGET) $(OBJS) $(LD_DIR) $(LD_FILE)
@echo "compile && link .......... OK"

clean:
rm -rf $(OBJS)

dclean:
rm -rf $(OBJS) $(TARGET)

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# gm
GM sm3/sm2 implement based on OpenSSL
Implement GM sm3/sm2 based on openssl project.
The specifications are <<GM/T 0003-2012>> and <<GM/T 0004-2012>>.

You should build your own openssl project, because openssl-devel project
installed through yum/apt tool may #defined OPENSSL_NO_EC2M macro,
so F2m group is not supported.

In the older version of openssl(before version 1.0.2), there is no funcs
to control ECDSA_METHOD struct, so I choose the openssl-1.0.2h version.

Author: lnwdl ([email protected])
Loading

0 comments on commit d0afa26

Please sign in to comment.