<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello,<br>
With the Subject Name Constraint you can tweak the components to
build the subject DN, and do some pattern matching to select them
to re-write the subject DN, but you cannot really modify parts of
the values of those components.<br>
I don't think you can match and accept a string with \x00 and then
selectively remove the \x00 or any specific string, once it is
matched, it is accepted, it is flexible but "basic".<br>
The design of the name constraint was for matching string on
components, so that would be a request for enhancement for more
regexp support.<br>
Ideally the client should be fixed to do the right thing.<br>
But if not possible, one solution may be to take the existing
SubjectNameConstraint plug-in and use it as a base to write a
custom one, from:<br>
base/server/cms/src/com/netscape/cms/profile/constraint/SubjectNameConstraint.java<br>
Should Dogtag have another name constraint plug-in to validate the
inputs to not accept \x00 or strip some strings before reaching
the NameConstraintsExt, plug-in?<br>
Thanks,<br>
M.<br>
<br>
On 02/25/2016 12:25 AM, Supper Florian OSS sIT wrote:<br>
</div>
<blockquote
cite="mid:F95B9160F6A79A4C88CFD35FACC6F002152DCD2F@M0183.s-mxs.net"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi and good morning.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">I get some request from
mobile devices which are very poor.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Subject:
CN=B1C43CD0-1624-5FBB-8E54-34FG17DFD3A1\x00</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">With this subject name,
it is not possible to enroll a certificate, because of the
\x00 at the end..
</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">So im compelled to
rewrite the Subject name. In the first way I only want to
remove the \x00 characters from CN.</span></p>
<p class="MsoNormal"><span lang="EN-US">Ive tried some pattern
and configs, but it doesnt work.</span></p>
<p class="MsoNormal"><span lang="EN-US">Does one of you knows
how this could work?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.constraint.class_id=subjectNameConstraintImpl</span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.constraint.name=Subject
Name Constraint</span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.constraint.params.accept=true</span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.constraint.params.pattern=.*</span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.default.class_id=userSubjectNameDefaultImpl</span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.default.name=Subject
Name Default</span></p>
<p class="MsoNormal"><span lang="EN-US">policyset.cmcUserCertSet.1.default.params.name=.*CN=
..</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">In the second way, i
want to set the whole subject like this below. But I want to
use the CN which comes in the csr.</span></p>
<p class="MsoNormal"><span lang="EN-US">Subject: C=AT,
ST=Vienna, L=Vienna, O=My Company GmbH, OU=MYORGUNIT,
CN=mycn.example.com /emailAddress=pki-AT-example.com</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for your help.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">BR</span></p>
<p class="MsoNormal"><span lang="EN-US">Florian</span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pki-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pki-users@redhat.com">Pki-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/pki-users">https://www.redhat.com/mailman/listinfo/pki-users</a></pre>
</blockquote>
<br>
</body>
</html>