Skip to content

Commit f3dde51

Browse files
author
smcmahonibm
committed
Comments for signing key gen
loadtest and iccperf should not be built.
1 parent 7397e65 commit f3dde51

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

icc/Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,15 +1148,23 @@ nist_algs$(EXESUFX): nist_algs1$(OBJSUFX)
11481148

11491149
#=============================== Code sign/verify ==============================
11501150

1151+
# Note that the signing key should be present - supplied by the build, not in repo.
1152+
# this shows how one can be generated if required.
1153+
11511154
#- stand alone signing tool
11521155
privkey.rsa:
11531156
$(OPENSSL_PATH_SETUP) $(REALOPENSSL) genrsa -out privkey.rsa 2048
11541157

1158+
# matching public key for signature checking
1159+
# this shows how one can be derived from the private key if required.
1160+
# include sanity check because ZOSa can muck up this file
1161+
11551162
pubkey.h: privkey.rsa
11561163
$(OPENSSL_PATH_SETUP) $(REALOPENSSL) rsa -in privkey.rsa -outform PEM -RSAPublicKey_out > rsa_pub_key.pem
11571164
perl pem2c.pl rsa_pub_key.pem > pubkey.h
1158-
rm rsa_pub_key.pem
11591165
cat pubkey.h
1166+
grep " 0x30,0x82," pubkey.h
1167+
rm rsa_pub_key.pem
11601168

11611169
signer$(OBJSUFX): extsig.c
11621170
$(CC) -DSTANDALONE -DOPSYS=\"$(OPSYS)\" $(CFLAGS) -I$(OSSLINC_DIR) extsig.c $(OUT)$@
@@ -1177,7 +1185,10 @@ status$(OBJSUFX): status.c status.h icclib.h
11771185
$(CC) $(CFLAGS) -I$(SDK_DIR) -I$(OSSLINC_DIR) -I$(OSSL_DIR) -I$(API_DIR) status.c
11781186

11791187
#- Build ICC FIPS code
1188+
# include a sanity check for the pubkey.h include file - should be DER encoding - we can get a broken one on ZOSa
11801189
fips$(OBJSUFX): pubkey.h fips.c fips.h icclib.h iccerr.h $(PRNG_DIR)/fips-prng-RAND.h tracer.h
1190+
cat pubkey.h
1191+
grep " 0x30,0x82," pubkey.h
11811192
$(CC) $(CFLAGS) -I./ -I$(SDK_DIR) -I$(OSSLINC_DIR) -I$(OSSL_DIR) -I$(API_DIR) fips.c
11821193

11831194
#- Compile the FIPS prng code

iccpkg/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ TARGETS = \
152152
$(TIMER_OBJS) \
153153
icctest$(EXESUFX) \
154154
icctest_s$(EXESUFX) \
155-
loadtest$(EXESUFX) GenRndData2$(EXESUFX) $(ICCPKG_PERF) \
155+
GenRndData2$(EXESUFX) \
156156
smalltest$(EXESUFX) \
157157
$(JGSK_TARGETS) $(JSDK_TARGETS) \
158158
$(ICKC_TARGETS) ICKCSDK_TARGETS

0 commit comments

Comments
 (0)