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

Making fingerprint part of SDP created by createOffer/Answer #427

Closed
wants to merge 18 commits into from
Closed

Making fingerprint part of SDP created by createOffer/Answer #427

wants to merge 18 commits into from

Conversation

stefhak
Copy link
Contributor

@stefhak stefhak commented Jul 1, 2015

First cut. The key and certificate is hard coded. Tested to work with FF (sending the SDPs from createO/A).

@stefhak stefhak assigned Rugvip and unassigned adam-be Aug 25, 2015
@stefhak
Copy link
Contributor Author

stefhak commented Aug 25, 2015

Tested to work with FF.

@stefhak
Copy link
Contributor Author

stefhak commented Sep 3, 2015

I updated a bit. Could someone please review this one (I think there are plenty of things in _crypto_utils.c that are not up to par)?

@stefanalund
Copy link
Contributor

@pererikb could you have a look at this?

@stefhak
Copy link
Contributor Author

stefhak commented Sep 22, 2015

@stefanalund, @Rugvip has already promised to review.

@@ -1158,14 +1158,18 @@ static GstElement *add_dtls_srtp_bin(OwrTransportAgent *transport_agent, guint s
if (!is_encoder) {
g_object_get(session, "dtls-certificate", &cert, NULL);
g_object_get(session, "dtls-key", &key, NULL);
g_print("transport_agent cert = %s\nkey = %s\n", cert, key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be replaced by GST_CAT_DEBUG calls, i.e.

GST_CAT_INFO_OBJECT(_owrsession_debug, session, "transport_agent cert = %s\nkey = %s\n", cert, key);

@pearcetm
Copy link

This PR will be very useful for the project I'm developing - now that it has been reviewed, what kind of timeline are we looking at for getting these changes updated and eventually merged? A few days, a week or two, months... I know nothing is for sure but a rough idea would be really helpful in planning for further development.

@stefhak
Copy link
Contributor Author

stefhak commented Sep 22, 2015

I'll try to address the comments tomorrow, I think (fingers crossed) we should get this one in within a few days.

@stefhak
Copy link
Contributor Author

stefhak commented Sep 23, 2015

@Rugvip I addressed your comments (they were good, thanks) except for the error reporting one which I defered to a later error handing update. PTAL.

g_value_init(&params[2], G_TYPE_STRING);

if (errorDetected) {
g_print("error detected \n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we should avoid g_print in committed code. All of these g_print statements should be replaced by GStreamer debug logging functions, so that we can show and hide them as needed, and provide some context. Especially this print statement will be very confusing unless you know exactly where you should be looking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rugvip I can easily change them all, but need some help. Should I use GST_DEBUG_OBJECT? What object should I tie it do? Or should I simply use GST_DEBUG()?

@stefhak
Copy link
Contributor Author

stefhak commented Sep 23, 2015

@Rugvip: have now changed the g_print's to GST_DEBUG's. PTAL.

@Rugvip
Copy link
Contributor

Rugvip commented Sep 23, 2015

Just a minor thing, there's no need to mention the file in GST_DEBUG, as it's already a part of the log message, and there's also no need to add a newline. Otherwise, 👍

@stefhak
Copy link
Contributor Author

stefhak commented Sep 23, 2015

@Rugvip fixed those two items. Ready to merge?

X509_sign (cert, key_pair, EVP_sha256 ());

if (!X509_digest(cert, fprint_type, fprint, &fprint_size)) {
GST_DEBUG("Error, could not create certificate fingerprint");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GST_ERROR()

@superdump
Copy link
Contributor

I was working on merging this but it seems that it does not rebase cleanly. There are conflicts with the code in master. Sorry for the inconvenience, but can you rebase on top of master? Then I will merge it.

@stefhak
Copy link
Contributor Author

stefhak commented Oct 22, 2015

Thanks for working on this. I will rebase.

…front to be standards compliant (offer/answer from createOffer/Answer contains them).

mods.

mods

mods.

Generating private key, cert and fingerpring in owr-crypto_utils works with this version (harcoded). And the offer from createOffer createAnswer can be sent off.

Trying to use openssl.

more tests.

testing continues.

more tests.

testing

testing.

testing.

testing.

testing.

test

more testing.

test.

test.

test

test.

test

test.

test

test

test

test

test

test

test

test

test

test

test

test

test

test.

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test

test
@stefhak
Copy link
Contributor Author

stefhak commented Oct 22, 2015

So, I think (fingers crossed) I managed to rebase. FWIW I have re-run the tests, and things still seem to work.

@stefhak stefhak closed this in 1a17818 Oct 22, 2015
@superdump
Copy link
Contributor

It is done. :)

@stefanalund
Copy link
Contributor

Wohooo, this is huge! 😄

@stefhak
Copy link
Contributor Author

stefhak commented Oct 22, 2015

:-)

@stefanalund
Copy link
Contributor

I'm currently working on a major new version of Bowser as well that makes it much more reliable (using WKWebView). Combined with this PR we should soon have a Bowser that is significantly better.

@ford-prefect
Copy link
Contributor

The assert added in add_dtls_srtp_bin() seems to break test-send-receive.

@superdump
Copy link
Contributor

Indeed. We'll have to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants