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 861478 Details for
Bug 674684
Enhance certutil to be able to create certs for anonymous PKINIT
[?]
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.
python script that uses pyasn1 to encode a raw DER pkinit-subject-alt-name extension
pkinit-der-encode.py (text/plain), 1.64 KB, created by
Kai Engert (:kaie) (inactive account)
on 2014-02-10 16:07:56 UTC
(
hide
)
Description:
python script that uses pyasn1 to encode a raw DER pkinit-subject-alt-name extension
Filename:
MIME Type:
Creator:
Kai Engert (:kaie) (inactive account)
Created:
2014-02-10 16:07:56 UTC
Size:
1.64 KB
patch
obsolete
>from pyasn1.codec.der import encoder >from pyasn1.type import univ, char, tag > >def fill_sequence(seq, *vals): > for i in range(len(vals)): > seq.setComponentByPosition(i, vals[i]) > >class IntegerTagged0(univ.Integer): > tagSet = univ.Integer.tagSet.tagExplicitly( > tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)) > >class SequenceTagged1(univ.Sequence): > tagSet = univ.Sequence.tagSet.tagExplicitly( > tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)) > >class SequenceTagged0(univ.Sequence): > tagSet = univ.Sequence.tagSet.tagExplicitly( > tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)) > >class SequenceImplicitlyTagged0(univ.Sequence): > tagSet = univ.Sequence.tagSet.tagImplicitly( > tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)) > >class GeneralStringTagged0(char.GeneralString): > tagSet = char.GeneralString.tagSet.tagExplicitly( > tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)) > >id_pkinit_san = univ.ObjectIdentifier('1.3.6.1.5.2.2') > >realm = GeneralStringTagged0('EXAMPLE.COM@EXAMPLE.COM') > >name_type = IntegerTagged0(1) > >name_string = SequenceTagged1() >fill_sequence(name_string, char.GeneralString('krbtgt'), char.GeneralString('EXAMPLE.COM@EXAMPLE.COM')) > >principal_name = SequenceTagged1() >fill_sequence(principal_name, name_type, name_string) > >KRB5PrincipalName = SequenceTagged0() >fill_sequence(KRB5PrincipalName, realm, principal_name) > >other_san = SequenceImplicitlyTagged0() >fill_sequence(other_san, id_pkinit_san, KRB5PrincipalName) > >all_san = univ.Sequence() >fill_sequence(all_san, other_san) > >outfile = open("pkinit.san-extension.der", "wb"); >outfile.write(encoder.encode(all_san)) >outfile.close()
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 674684
:
476672
|
740648
|
740651
|
740860
|
740894
| 861478 |
861481
|
861482
|
861486