Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an application to list providers capabilities #693

Closed
emaldona opened this issue May 12, 2021 · 11 comments
Closed

Add an application to list providers capabilities #693

emaldona opened this issue May 12, 2021 · 11 comments
Labels
enhancement New feature or request javax Work to support javax.net.ssl interfaces

Comments

@emaldona
Copy link
Contributor

List the capabilities of the "Mozilla-JSS" and other installed providers.
I have such an application in my own fork of jss in the capabilities branch.
See it at
https://github.com/emaldona/capabilities

Before submitting a pull request it would be good to have a discussion here.
A few things to come to my mind:
Is this useful at all?
Should it be a sample or some other stand-alone application? (Hard to do it as a test)
Is what yo see too complex and it should be made simpler?

@cipherboy
Copy link
Member

I think this would be interesting as it'd let us see what features the JDK implements (at different versions) and see what else we'd need to add in, to reach compatibility. Since we're attempting to be a default crypto provider, it would be nice to ensure we're mostly close to what the JDK provides. Hopefully other packages written to the JDK provider can have similar algorithms available under JSS and behave well. Large gaps in coverage are likely an issue (such as #341 and #242).

I do agree that listing seems better than a test.

Do you have sample output you could share? I'm curious where we're at currently.

@cipherboy cipherboy added enhancement New feature or request javax Work to support javax.net.ssl interfaces labels May 12, 2021
@emaldona
Copy link
Contributor Author

This tar has the sample out you asked for
listings.zip

@emaldona
Copy link
Contributor Author

unzip listing.zip; tar xvf listings.tar should extract them.

@emaldona emaldona reopened this May 12, 2021
@cipherboy
Copy link
Member

Hmm... For the alias entries, is there any chance you could show them under the section and perhaps omit them from the brief listings?

I'm thinking something like:

Signature.SHA512withEC
    alias: Alg.Alias.Signature.SHA512/EC
    alias: Alg.Alias.Signature.SHA-512/EC
    ...
...

And perhaps also sort the top-level algorithms and perhaps interior aliases for stability?

I realize its a lot of work (happy to submit PR to your tool if you're interested) -- but I think that will make the output much more comparable. As it is, especially with the OID aliases, it is really hard to compare e.g., Mozilla-JSS against the SunJSSE provider. This might also identify that we're using different base algorithm names (perhaps they use SHA-512/EC by default and we use SHA512withEC, I dunno), but at least we might be able to find them more easily and see if we're missing any aliases this way.

Did you have something in mind? :-)

My 2c. at any rate.

@cipherboy cipherboy assigned cipherboy and unassigned cipherboy May 12, 2021
@emaldona
Copy link
Contributor Author

somewhere you wrote this
cd build && ./run_test.sh org,mozilla.test.CapabilityList (doing export JAVA_SECURITY_CFG='')
Tried but it doesn't work for me.

@cipherboy
Copy link
Member

cipherboy commented May 13, 2021

@emaldona Did you make sure you built the new commit first? E.g.:

git clone https://github.com/cipherboy/jss
cd jss && git checkout capabilities-cmake-build
cd build
cmake .. && make
./run_test.sh org.mozilla.jss.tests.CapabilitiesList

Since the file moved, you'd have to rebuild JSS first before this works.

(Edit Dropped the S in testS on the class path above).

@emaldona
Copy link
Contributor Author

Let me try it in two steps then.

@emaldona
Copy link
Contributor Author

Failed, it can't find or load the main class. Let's discuss it one IRC.

@emaldona
Copy link
Contributor Author

It's working now. I did "diff -r ~/one/ listings" where the first is listings before the second commit and the second is one done in the capabilities-change-output branch. Here are the results
oneVSTwoListings.txt

@emaldona
Copy link
Contributor Author

emaldona commented May 14, 2021 via email

emaldona added a commit to emaldona/jss that referenced this issue May 18, 2021
 - some of it was adapted from Alex Sheel comments on issue dogtagpki#693
   see dogtagpki#693
emaldona added a commit to emaldona/jss that referenced this issue May 20, 2021
 - some of it was adapted from Alex Sheel comments on issue dogtagpki#693
   see dogtagpki#693
@emaldona emaldona mentioned this issue May 20, 2021
@cipherboy
Copy link
Member

I think this can be closed as #704 has merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javax Work to support javax.net.ssl interfaces
Projects
None yet
Development

No branches or pull requests

2 participants