Closed
Bug 480076
Opened 17 years ago
Closed 13 years ago
need sample source: how to avoid hard coding SSL cipher suite info
Categories
(NSS :: Documentation, enhancement, P4)
NSS
Documentation
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: nelson, Assigned: elio.maldonado.batiz)
Details
Attachments
(2 files, 2 obsolete files)
For years, libSSL has has functions that enable an application to dynamically
adjust to new cipher suites as they become available in newer NSS releases,
without needing to modify or recompile application source code. This obviates
hard coded application tables of attributes for SSL cipher suites. But there
has been no code that demonstrates how to use it, so the feature has gone
largely (perhaps totally) unused. We need sample code for it.
That's the purpose of the attachment. I'd actually like to commit this in a
new subdirectory of mozilla/security/nss/cmd. Any objections?
Attachment #364026 -
Flags: review?
| Reporter | ||
Comment 1•17 years ago
|
||
1 minor correction. The line that reads:
((info.cipherSuite & 0xff00) == 0xff00 ? "SSL2" : ""),
should instead read:
(SSL_IS_SSL2_CIPHER(info.cipherSuite) ? "SSL2" : ""),
I meant to fix that before attaching it.
| Reporter | ||
Updated•17 years ago
|
Attachment #364026 -
Flags: review? → review?(emaldona)
| Assignee | ||
Comment 2•17 years ago
|
||
Line 45 includes secutil.h a non-public header. This is currently needed because Lines 70 and 79 call SECU_Strerror, from sectools, a tools support library that we don't yet ship and support.
Once this dependency is removed the sample should build stand-alone via as simple a makefile target as:
listsuites: listsuites.c
gcc -Wall -Werror -g $^ -o $@ \
-lnspr4 -lnss3 -lssl3 -I/usr/include/nspr4 -I/usr/include/nss3
| Reporter | ||
Updated•17 years ago
|
Priority: -- → P3
| Reporter | ||
Comment 3•17 years ago
|
||
Elio,
Was your comment 2 meant to be interpreted as an R- ?
If so, please set the review- flag. Thanks.
| Reporter | ||
Updated•17 years ago
|
Assignee: nobody → nelson
| Assignee | ||
Updated•17 years ago
|
Attachment #364026 -
Flags: review?(emaldona) → review-
| Reporter | ||
Updated•16 years ago
|
Assignee: nelson → nobody
| Assignee | ||
Comment 4•13 years ago
|
||
Since nss 3.13 we have support for localizeable error strings via PORT_ErrorToString. So with these changes
$ diff ~/Downloads/listsuites.c ./listsuites.c
45c45
< #include "secutil.h"
---
> #include "secport.h"
70c70
< suite, i, SECU_Strerror(err));
---
> suite, i, PORT_ErrorToString(err));
79c79
< suite, i, SECU_Strerror(err));
---
> suite, i, PORT_ErrorToString(err));
the sample will rely on public headers and only.
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → emaldona
| Assignee | ||
Comment 5•13 years ago
|
||
Attachment #364026 -
Attachment is obsolete: true
Attachment #647260 -
Flags: review?(kaie)
| Assignee | ||
Updated•13 years ago
|
Attachment #647260 -
Attachment description: Source file that demonstrates use if SSL_GetCipherSuiteInfo → Source file that demonstrates use of SSL_GetCipherSuiteInfo
| Assignee | ||
Comment 6•13 years ago
|
||
Attachment #647260 -
Attachment is obsolete: true
Attachment #647260 -
Flags: review?(kaie)
Attachment #647642 -
Flags: review?(kaie)
| Assignee | ||
Updated•13 years ago
|
Priority: P3 → P4
Updated•13 years ago
|
Attachment #647642 -
Attachment is patch: true
Attachment #647642 -
Attachment mime type: text/x-csrc → text/plain
Updated•13 years ago
|
Attachment #647642 -
Attachment is patch: false
Comment 7•13 years ago
|
||
Please make the replacement that Nelson suggested in comment 1.
I read the code and it looks find to me.
But this isn't a patch, where do you want this code to live?
Without makefile changes this work isn't complete.
Comment 8•13 years ago
|
||
Attachment #656087 -
Flags: review?(emaldona)
Comment 9•13 years ago
|
||
Comment on attachment 647642 [details]
Demonstrates use of SSL_GetCipherSuiteInfo - updated license
r+ but please make the requested changes.
I attached a new patch, please feel free to r+ and check it in if you think this is OK.
(remember to use "cvs add" on the directory and all new files.)
Attachment #647642 -
Flags: review?(kaie) → review+
| Assignee | ||
Updated•13 years ago
|
Attachment #656087 -
Flags: review?(emaldona) → review+
| Assignee | ||
Comment 10•13 years ago
|
||
Checked in to the trunk:
Checking in mozilla/security/nss/cmd/manifest.mn;
/cvsroot/mozilla/security/nss/cmd/manifest.mn,v <-- manifest.mn
new revision: 1.38; previous revision: 1.37
done
RCS file: /cvsroot/mozilla/security/nss/cmd/listsuites/Makefile,v
done
Checking in mozilla/security/nss/cmd/listsuites/Makefile;
/cvsroot/mozilla/security/nss/cmd/listsuites/Makefile,v <-- Makefile
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/security/nss/cmd/listsuites/listsuites.c,v
done
Checking in mozilla/security/nss/cmd/listsuites/listsuites.c;
/cvsroot/mozilla/security/nss/cmd/listsuites/listsuites.c,v <-- listsuites.c
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/security/nss/cmd/listsuites/manifest.mn,v
done
Checking in mozilla/security/nss/cmd/listsuites/manifest.mn;
/cvsroot/mozilla/security/nss/cmd/listsuites/manifest.mn,v <-- manifest.mn
initial revision: 1.1
done
| Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•