File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
lib/puppet/parser/functions Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 7676
7777 # handle weak implementations of String#crypt
7878 # dup the string to get rid of frozen status for testing
79- if ( +'test' ) . crypt ( '$1$1' ) == '$1$1$Bp8CU9Oujr9SSEw53WV6G.'
79+ if RUBY_PLATFORM == 'java'
80+ # puppetserver bundles Apache Commons Codec
81+ org . apache . commons . codec . digest . Crypt . crypt ( password . to_java_bytes , salt )
82+ elsif ( +'test' ) . crypt ( '$1$1' ) == '$1$1$Bp8CU9Oujr9SSEw53WV6G.'
8083 password . crypt ( salt )
8184 else
8285 # JRuby < 1.7.17
8386 # MS Windows and other systems that don't support enhanced salts
84- raise Puppet ::ParseError , 'system does not support enhanced salts' unless RUBY_PLATFORM == 'java'
85-
86- # puppetserver bundles Apache Commons Codec
87- org . apache . commons . codec . digest . Crypt . crypt ( password . to_java_bytes , salt )
87+ raise Puppet ::ParseError , 'system does not support enhanced salts'
8888 end
8989end
You can’t perform that action at this time.
0 commit comments