File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
graal-nodejs/test/parallel Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,15 @@ const crypto = require('crypto');
8585 } , wrongBlockLength ) ;
8686 }
8787
88- assert . throws ( ( ) => {
89- dh3 . computeSecret ( '' ) ;
90- } , { message : common . hasOpenSSL3 ?
91- 'error:02800080:Diffie-Hellman routines::invalid secret' :
92- 'Supplied key is too small' } ) ;
88+ {
89+ const v = crypto . constants . OPENSSL_VERSION_NUMBER ;
90+ const hasOpenSSL3WithNewErrorMessage = ( v >= 0x300000c0 && v <= 0x30100000 ) || ( v >= 0x30100040 && v <= 0x30200000 ) ;
91+ assert . throws ( ( ) => {
92+ dh3 . computeSecret ( '' ) ;
93+ } , { message : common . hasOpenSSL3 && ! hasOpenSSL3WithNewErrorMessage ?
94+ 'error:02800080:Diffie-Hellman routines::invalid secret' :
95+ 'Supplied key is too small' } ) ;
96+ }
9397}
9498
9599// Through a fluke of history, g=0 defaults to DH_GENERATOR (2).
You can’t perform that action at this time.
0 commit comments