Skip to content

Commit

Permalink
add support for unlocking TrueCrypt and VeraCrypt volumes without mou…
Browse files Browse the repository at this point in the history
…nting them
  • Loading branch information
mhogomchungu committed Oct 21, 2017
1 parent d931ee4 commit e662915
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion zuluCrypt-cli/bin/open_volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,9 @@ int zuluCryptEXEOpenVolume( const struct_opts * opts,const char * mapping_name,u
volume.iteration_count = v_info.iteration_count ;

volume.veraCrypt_volume = StringAtLeastOneMatch( v_info.type,"vcrypt","veracrypt","vera",NULL ) ;
volume.trueCrypt_volume = StringAtLeastOneMatch( v_info.type,"tcrypt","truecrypt",NULL ) ;

if( !volume.veraCrypt_volume ){
if( !volume.veraCrypt_volume && !volume.trueCrypt_volume ){

if( opts->offset != NULL ){

Expand Down
1 change: 1 addition & 0 deletions zuluCrypt-cli/lib/includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ typedef struct{
int general_detached_header ;
int tcrypt_keyfiles_count ;
int veraCrypt_volume ;
int trueCrypt_volume ;
int tcrypt_system ;
const char * const * tcrypt_keyfiles ;
unsigned long m_flags ;
Expand Down
7 changes: 6 additions & 1 deletion zuluCrypt-cli/lib/open_volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,12 @@ int zuluCryptOpenVolume_2( const open_struct_t * opts )
*/
r = zuluCryptOpenVolume_0( zuluCryptOpenPlain_1,opts ) ;
}else{
r = zuluCryptOpenVolume_1( opts ) ;
if( opts->veraCrypt_volume || opts->trueCrypt_volume ){

r = 4 ;
}else{
r = zuluCryptOpenVolume_1( opts ) ;
}

if( r == 4 && zuluCryptVolumeIsNotLuks( opts->device ) ){

Expand Down

0 comments on commit e662915

Please sign in to comment.