×

Discussion Board

Page 1 of 4 1234 LastLast
Results 1 to 15 of 53
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    59

    API capability requirements

    Is there a definitive reference listing which APIs \ libraries require which capabilities?

    I am currently trying to convert some libraries to 3rd Edition and the output is warning me that they require WriteDeviceData. I'm fairly sure that nothing I'm doing should require this but I can't figure out which API or library I'm using is causing this.

    The component in question initiates a network connection and uses datagram sockets.

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    Typing Capabilities into the search tab of the chm file will give you a list of all the modules and which capabilities they require.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    59

    Re: API capability requirements

    Do you mean the "Doxygen Analysis of capabilities for Configuration:" pages?

    It is still ambiguous. For example I have looked at COMMDB and all the methods are list as:

    Unconditional capabilities: Dependent
    Conditional Capabilities:

    Does this mean there are no capabilities required?

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    As I understand it 'Dependent' is used to indicate that a function that has no unconditional capabilities has conditional capabilities. Due to the nature of the parameters being passed in, a capability may be required in order to use some of the functionality. In practise this seems to have morphed into a catchall documentation convention.

    Unfortunalty I cannot find any publically avaliable documentation to clarify this.

    What they are telling you in the COMMDB API's is that there may be capability issues when reading or writing to the comms database DB
    Last edited by Paul.Todd; 2006-05-23 at 20:28.

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    59

    Re: API capability requirements

    Under the circumstances how do you suggest I proceed?

    It looks as if the only way I'll find out the calls I'm making that require this capability is by trial and error, adding and removing code from the project. Somewhat time consuming and if dependant on the values of parameters somewhat impractical too.

    Alternatively I could just accept that I need this capability but due to it being an 'extended' capability it will cost £400 for an ACS publisher ID just to get a developer certificate to test with.

    [EDIT]

    Just to clarify I have removed all references to CommDB and the only library outside of the standard user libraries that I link to is ESock.

    I am using RSocket and RConnection. A number of methods here are also listed as dependant. I can only assume it is one of these that requires WriteDeviceData although I fail to see why.
    Last edited by mark_williams; 2006-05-24 at 11:20.

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    I had a quick look at the include file for RSocket and it requires NetworkServices for TCP or UDP. This is user grantable so I think it would be ok

    Some of the other API's might require network control which is a manufacturer capability.

    As I don't know what API's you are using it is rather hard to tell.

    You could email me a list of the RConnecton and RSocket API's and I will see if a can get a capability list from the docs I have

    We asked both Nokia, Symbian and CG if they had an application to take an executable and analyse it to see what functions require which capabilites and they do not have it which is big problem as one of the signing requirements is that each API needs to be listed.

    We have yet to find a workaround aside from manually checking and even then with dependant API's parameters its a nightmare, but luckily not my nightmare

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    I have a section in the help file called "Symbian OS changes for platform security" which covers the changes.

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    59

    Re: API capability requirements

    This is the full list of methods I call in from ESOCK.

    RSocketServer::Open()
    RSocketServer::Close()

    RConnection::Start()
    RConnection::EnumerateConnections()
    RConnection::GetConnectionInfo()
    RConnection::Open()
    RConnection::Close()
    RConnection::ProgressNotification()
    RConnection::CancelProgressNotification()

    RSocket::Open() // KAfInet, KSockDatagram, KProtocolInetUdp
    RSocket::Close()
    RSocket::SendTo()
    RSocket::CancelSend()
    RSocket::CancelRecv()
    RSocket::RecvFrom()

  9. #9
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    Sorry but I can't see anything obviously wrong, maybe its somewhere else in your code.

  10. #10
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    59

    Re: API capability requirements

    I've built a simple test app that links to the library in question. It only calls a couple of the methods because the sophisticated nature of it would require lots of effort to write the code.

    However I don't receive the same warning in the output file that I do when I run my full application.

    According to the error it's just because I link to the dll but now I have 2 apps which link to the same library, one of which gets the warning and one of which doesn't? Is this just a misleading error message? It is much more likely that I have code in my main application that requires this capability but the message reads like the problem is in the dll.

    47.045 *PlatSec* WARNING - Capability check would have failed - Can't load MyApp.exe because it links to MyDll.dll which has the following capabilities missing: WriteDeviceData

  11. #11
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    This means that your application requires WriteDeviceData because MyDll also has it.

    MyDll could also be loading a dependent dll which requires this capability. It definalty look like the issue is to do with runtime linking of the dll's rather than calling a particular function.

    The GCC compiler is pretty bad at removing unreferenced functions and libraries so it could be that there is a library being linked that is not being used and so the problem lies there

  12. #12
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    59

    Re: API capability requirements

    That is how I read the error too but, given that I have written a simple test application that links to MyDll which _doesn't_ give the same error at runtime I can't see that it can be due to unreferenced functions.

    The only way I can understand that one works and one doesn't is if the capability check is performed on a method by method basis.

  13. #13
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    You could always run "petran -dump s <filename>" to show what security info is being built at runtime.

    Also note that I said your application has not WriteDeviceData, so your DLL will require this capability as well.

  14. #14
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: API capability requirements

    Quote Originally Posted by mark_williams
    ... 47.045 *PlatSec* WARNING - Capability check would have failed - Can't load MyApp.exe because it links to MyDll.dll which has the following capabilities missing: WriteDeviceData ...
    Quote Originally Posted by Paul.Todd
    ...This means that your application requires WriteDeviceData because MyDll also has it.
    ...
    Actually this means that your DLL requires WriteDeviceData because the application already has it (even though your DLL may not call APIs which need this capability !).

    The point is that an application can only load a DLL if the DLL in question has at least the same capability set as the loading application. The opposite is not true, a application having no capability can load a DLL having e.g. ALL-TCB.

    See S60 3rd SDK's documentaion (platform_security_a_technical_overview_v1.1.pdf, 4.2 How Capabilities Affect DLLs) or Craig Heat's "Symbian OS Platform Security" book, chapter 2.4.5 Capability Rules

    Best regards,

  15. #15
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: API capability requirements

    You could always run "petran -dump s <filename>" to show what security info is being built at runtime.

    Also note that I said your application has WriteDeviceData, so your DLL will require this capability as well.

Similar Threads

  1. PC Suite error: (Code: Init IMediaControl2) HELP?!
    By chunkyspudmonkey in forum General Development Questions
    Replies: 30
    Last Post: 2014-07-15, 05:44
  2. Is there a C++ API for the video player
    By avbrozhko in forum Symbian
    Replies: 9
    Last Post: 2008-06-06, 14:34
  3. User Comments and Examples into API Docs
    By jyrkiettila in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 4
    Last Post: 2006-04-21, 11:04
  4. What is Illegal Capability
    By Roose in forum Symbian
    Replies: 2
    Last Post: 2006-03-09, 15:07
  5. Cryptography (cryptalg) API on Series 60?
    By cbrueckner in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-05-08, 11:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×