@@ -1014,63 +1014,6 @@ Temporary session not preserved."
1014
1014
exit 1
1015
1015
} # => cleanup()
1016
1016
1017
- # Escape hazardous characters
1018
- # Auto-escape hazardous characters:
1019
- # '&' - Workaround 'sed' behavior
1020
- # '$' - Workaround 'easyrsa' based limitation
1021
- # This is required for all SSL libs, otherwise,
1022
- # there are unacceptable differences in behavior
1023
- escape_hazard() {
1024
- if [ "$EASYRSA_FORCE_SAFE_SSL" ] || \
1025
- [ "$makesafeconf" ]
1026
- then
1027
- # Always run
1028
- verbose "escape_hazard: FORCED"
1029
- elif [ "$working_safe_org_conf" ]; then
1030
- # Has run once
1031
- verbose "escape_hazard: BYPASSED"
1032
- return
1033
- else
1034
- # Run once
1035
- verbose "escape_hazard: RUN-ONCE"
1036
- fi
1037
-
1038
- # Only use if old 'sed' version is requested
1039
- if [ "$EASYRSA_LEGACY_SAFE_SSL" ]; then
1040
- : # ok
1041
- else
1042
- verbose "escape_hazard: REPLACED by heredoc expansion"
1043
- verbose "escape_hazard: ABANDONED"
1044
- return
1045
- fi
1046
-
1047
- # Set run once
1048
- working_safe_org_conf=1
1049
-
1050
- # Assign temp-file
1051
- escape_hazard_tmp=""
1052
- easyrsa_mktemp escape_hazard_tmp || die \
1053
- "escape_hazard - easyrsa_mktemp escape_hazard_tmp"
1054
-
1055
- # write org fields to org temp-file and escape '&' and '$'
1056
- print "\
1057
- export EASYRSA_REQ_COUNTRY=\"$EASYRSA_REQ_COUNTRY\"
1058
- export EASYRSA_REQ_PROVINCE=\"$EASYRSA_REQ_PROVINCE\"
1059
- export EASYRSA_REQ_CITY=\"$EASYRSA_REQ_CITY\"
1060
- export EASYRSA_REQ_ORG=\"$EASYRSA_REQ_ORG\"
1061
- export EASYRSA_REQ_OU=\"$EASYRSA_REQ_OU\"
1062
- export EASYRSA_REQ_EMAIL=\"$EASYRSA_REQ_EMAIL\"
1063
- export EASYRSA_REQ_SERIAL=\"$EASYRSA_REQ_SERIAL\"\
1064
- " | sed -e s\`'\&'\`'\\\&'\`g \
1065
- -e s\`'\$'\`'\\\$'\`g \
1066
- > "$escape_hazard_tmp" || die "\
1067
- escape_hazard - Failed to write temp-file"
1068
-
1069
- # Reload fields from fully escaped temp-file
1070
- source_vars "$escape_hazard_tmp"
1071
- verbose "escape_hazard: COMPLETED"
1072
- } # => escape_hazard()
1073
-
1074
1017
# Replace environment variable names with current value
1075
1018
# and write to temp-file or return error from sed
1076
1019
expand_ssl_config() {
@@ -1188,10 +1131,6 @@ easyrsa_openssl() {
1188
1131
die "easyrsa_openssl: Illegal SSL command: rand"
1189
1132
esac
1190
1133
1191
- # Auto-escape hazardous characters
1192
- escape_hazard || \
1193
- die "easyrsa_openssl - escape_hazard failed"
1194
-
1195
1134
# Rewrite SSL config
1196
1135
expand_ssl_config || \
1197
1136
die "easyrsa_openssl - expand_ssl_config failed"
0 commit comments