hierynomus / smbj

Server Message Block (SMB2, SMB3) implementation in Java
Other
713 stars 180 forks source link

UnsupportedOperationException during list operation when using SMB 3_1_1 Version #617

Closed rokkakasu closed 3 years ago

rokkakasu commented 3 years ago

Caused by: java.lang.UnsupportedOperationException: null at com.hierynomus.security.jce.JceSecurityProvider.getDerivationFunction(JceSecurityProvider.java:64) at com.hierynomus.smbj.connection.SMBSessionBuilder.deriveKey(SMBSessionBuilder.java:290) at com.hierynomus.smbj.connection.SMBSessionBuilder.setupSession(SMBSessionBuilder.java:168) at com.hierynomus.smbj.connection.SMBSessionBuilder.setupSession(SMBSessionBuilder.java:142) at com.hierynomus.smbj.connection.SMBSessionBuilder.establish(SMBSessionBuilder.java:109) at com.hierynomus.smbj.connection.Connection.authenticate(Connection.java:192) at org.apache.camel.component.smbj.SmbFileOperations.createSession(SmbFileOperations.java:430) at org.apache.camel.component.smbj.SmbFileOperations.invokeOnDiskShare(SmbFileOperations.java:541) at org.apache.camel.component.smbj.SmbFileOperations.listFiles(SmbFileOperations.java:331)

hierynomus commented 3 years ago

For SMB3.1.1 support you need to use the BouncyCastle SecurityProvider for now. Support for the Key Derivation Functions to the JCE Security Provider is still in the works.

rokkakasu commented 3 years ago

Team

I have referred https://github.com/hierynomus/smbj/issues/479 on how to added SmbConfig cfg = SmbConfig.builder().withSecurityProvider(new BCSecurityProvider()).build();

My app started to work , thanks.

Could you please tell the advantage and disadvantages please it will be helpful.

Thanks, R Ramarajan.

rokkakasu commented 3 years ago

My issue is fixed after adding BC Security. it could be nice to have info on differences and advantages of BC and JCE security providers.