Alexander,

This should be quite easy to do, because bundles can be installed from
simple InputStreams. If you have a bundle that handles the decryption
of the bytes then you can feed the decrypted bytes to the framework.

Please bear in mind though that encrypting code can always be worked
around, so it generally fails as a security device. The code has to be
unencrypted somewhere on the user's hardware and you have to deploy
the decryption key to the user! The best you can hope for is to
obfuscate this process a little, but it will never give you real
security.

Regards,
Neil

On Wed, Oct 27, 2010 at 10:32 AM, Alexander Shutyaev <[email protected]> wrote:
> Hi all!
> I wonder if there is any licensing mechanism in OSGi.
> What I need is a mechanism to make bundles run one some computers and fail
> on others. The ideal situation is that my bundles are somehow encrypted with
> a unique (for each computer) key. Each customer gets his personal encrypted
> version of bundle. The bundle container then gets the key from system (some
> kind of certificate analogue) and then checks if this bundle was encrypted
> with this key. On success it decrypts and deploys the bundle, on fail - it
> fails.
> Thanks in advance.
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to