Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 302814 Details for
Bug 442800
RFE: support UUID in Subject Alternative Name extension
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
a little refinement to clarify this is only UUID version 4 plus making the pattern flexible as others
san.diff (text/plain), 4.37 KB, created by
Christina Fu
on 2008-04-17 21:20:04 UTC
(
hide
)
Description:
a little refinement to clarify this is only UUID version 4 plus making the pattern flexible as others
Filename:
MIME Type:
Creator:
Christina Fu
Created:
2008-04-17 21:20:04 UTC
Size:
4.37 KB
patch
obsolete
>Index: base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java >=================================================================== >--- base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java (revision 20) >+++ base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java (working copy) >@@ -47,6 +47,8 @@ > public static final String CONFIG_GN_ENABLE = "subjAltExtGNEnable_"; > public static final String CONFIG_TYPE = "subjAltExtType_"; > public static final String CONFIG_PATTERN = "subjAltExtPattern_"; >+ public static final String CONFIG_SOURCE = "subjAltExtSource_"; >+ public static final String CONFIG_SOURCE_UUID4 = "UUID4"; > > public static final String CONFIG_OLD_TYPE = "subjAltExtType"; > public static final String CONFIG_OLD_PATTERN = "subjAltExtPattern"; >@@ -395,29 +397,55 @@ > String enable = getConfig(CONFIG_GN_ENABLE +i); > if (enable != null && enable.equals("true")) { > CMS.debug("SubjectAltNameExtDefault: createExtension i=" +i); >+ > String pattern = getConfig(CONFIG_PATTERN + i); > if (pattern == null || pattern.equals("")) { > pattern = " "; > } > >- if (!pattern.equals("")) { >+ if (!pattern.equals("")) { > String gname = ""; > >- if (request != null) { >- gname = mapPattern(request, pattern); >- } >+ // cfu - see if this is server-generated (e.g. UUID4) >+ // to use this feature, use $server.source$ in pattern >+ String source = getConfig(CONFIG_SOURCE +i); >+ String type = getConfig(CONFIG_TYPE + i); >+ if ((source != null) && (type.equalsIgnoreCase("OtherName"))) { >+ CMS.debug("SubjectAlternativeNameExtension: using "+ >+ source+ " as gn"); >+ if (source.equals(CONFIG_SOURCE_UUID4)) { >+ UUID randUUID = UUID.randomUUID(); >+ // call the mapPattern that does server-side gen >+ // request is not used, but needed for the substitute >+ // function >+ gname = mapPattern(randUUID.toString(), request, pattern); >+ } else { //expand more server-gen types here >+ CMS.debug("SubjectAltNameExtDefault: createExtension - unsupported server-generated type: "+source+". Supported: UUID4"); >+ continue; >+ } >+ } else { >+ if (request != null) { >+ gname = mapPattern(request, pattern); >+ } >+ } > if (gname.equals("")) { > CMS.debug("gname is empty, not added"); > continue; > } >- GeneralNameInterface n = parseGeneralName(getConfig(CONFIG_TYPE + i) + ":" + gname); >- CMS.debug("adding gname: "+gname); >- if (n != null) { >+ CMS.debug("SubjectAltNameExtDefault: createExtension got gname=" +gname); >+ >+ GeneralNameInterface n = parseGeneralName(type + ":" + gname); >+ >+ CMS.debug("adding gname: "+gname); >+ if (n != null) { >+ CMS.debug("SubjectAlternativeNameExtension: n not null"); > gn.addElement(n); > count++; >- } >- } >- } >+ } else { >+ CMS.debug("SubjectAlternativeNameExtension: n null"); >+ } >+ } >+ } > } //for > > if (count != 0) { >@@ -444,4 +472,21 @@ > } > return p.substitute("request", attrSet); > } >+ >+ // for server-side generated values >+ public String mapPattern(String val, IRequest request, String pattern) >+ throws IOException { >+ Pattern p = new Pattern(pattern); >+ IAttrSet attrSet = null; >+ if (request != null) { >+ attrSet = request.asIAttrSet(); >+ } >+ try { >+ attrSet.set("source", val); >+ } catch (Exception e) { >+ CMS.debug("SubjectAlternativeNameExtension: mapPattern source "+e.toString()); >+ } >+ >+ return p.substitute("server", attrSet); >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 442800
:
302679
|
302680
| 302814 |
302815
|
302822
|
302823
|
302826
|
302827