Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using .NET Encryptor with Third Party DLLs

 
Post new topic   Reply to topic    Infralution Support Forum Index -> .NET Encryptor Support
View previous topic :: View next topic  
Author Message
Chris



Joined: 16 Nov 2007
Posts: 4

PostPosted: Tue Aug 24, 2010 4:56 pm    Post subject: Using .NET Encryptor with Third Party DLLs Reply with quote

Hello,

I am developing an application that uses a number of third party DLL files, and I would like to merge them into the bootstrap executable. I do not have access to the source for the dlls. And each of the libraries is signed with a strong name from the manufacturer.

Is it possible to use the .enc filles from these dlls merged into the bootstrap executable or do I have to obtain the source from each of the third parties and re-compile them with my own strong name?

Thanks,
Chris

BTW - Excellent job on the component!
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4879

PostPosted: Tue Aug 24, 2010 10:51 pm    Post subject: Reply with quote

Provided that the third party DLLs are pure managed assemblies (ie not mixed assemblies) you can encrypt them and merge them into your bootstrap assembly. Since they aren't signed with your strong name you will need to explicitly specify the strong name to use to encrypt them. You can do this using the /strongnamefile option when encrypting the assembly. See the Command Line Options section in the help for more details.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
CynoxDev



Joined: 15 Feb 2013
Posts: 8

PostPosted: Fri Feb 15, 2013 1:44 pm    Post subject: Reply with quote

I have a class library project signed with its own pfx key-file that is referenced by the main application. The bootstrap project uses the same key file that is used by the main assembly. I specified the key file and the corresponding password for the class library using in the pre-build command line.
When i start the bootstrap executable, i get an exception "An unhandled exception occurred while bootstrapping the application." that further states that at least one type cannot be accessed. When i copy the class library to the folder, the application starts without problems, so the bootstrap doesn't seem to be able to extract the dll.
When i use the key file of the application for the class library, everything works fine. Is there something i am missing?

Tank you in advance,
Marcus
Back to top
View user's profile Send private message
CynoxDev



Joined: 15 Feb 2013
Posts: 8

PostPosted: Fri Feb 15, 2013 2:05 pm    Post subject: Reply with quote

I already solved it.

I was under the misconception that i need to specify the key-file and password that the class library was signed with (i thought the Encryptor somehow required this information to process the file). However, the key file from the main assembly is required so that the Encryptor can encrypt the file with the same key.

(correct me if i am still wrong Wink)
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4879

PostPosted: Sat Feb 16, 2013 2:41 am    Post subject: Reply with quote

That's correct. If an assembly is signed with the same strong name as the bootstrap assembly then you don't need to use the /token or /strongnamefile options because .NET Encryptor can just use the assemblies own strong name (which matches bootstrap). If an assembly is signed with a different strong name then you have to to provide the bootstrap assemblies public token or strongname.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> .NET Encryptor Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group