Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sha1 to sha256 in server/client cert generation #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thiorymos
Copy link

I encountered a problem where OpenVPN on Android couldn't connect because it deemed my certs "too weak". After searching on the topic, I found that you need to change default_md in openssl.conf to sha256, but unfortunately, that didn't help. I then realised that my client/server certs were sha1 despite the change in the config, and I thought "why not find it in the pkitool and change it", and voila, it worked perfectly!

changed sha1 to sha256 in server/client cert generation
@tungmeoo
Copy link

good

@@ -356,7 +356,7 @@ if [ -d "$KEY_DIR" ] && [ "$KEY_CONFIG" ]; then
( [ $DO_REQ -eq 0 ] || $OPENSSL req $BATCH -days $KEY_EXPIRE $NODES_REQ -new -newkey rsa:$KEY_SIZE \
-keyout "$FN.key" -out "$FN.csr" $REQ_EXT -config "$KEY_CONFIG" $PKCS11_ARGS ) && \
( [ $DO_CA -eq 0 ] || $OPENSSL ca $BATCH -days $KEY_EXPIRE -out "$FN.crt" \
-in "$FN.csr" $CA_EXT -md sha1 -config "$KEY_CONFIG" ) && \
-in "$FN.csr" $CA_EXT -md sha256 -config "$KEY_CONFIG" ) && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-in "$FN.csr" $CA_EXT -md sha256 -config "$KEY_CONFIG" ) && \
-in "$FN.csr" $CA_EXT -md sha256 -config "$KEY_CONFIG" ) && \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants