How to identify a Yubikey (5 NFC) by its HID report descriptor - uefi
I want to access the Yubikeys FIDO2 functionality under UEFI.
The FIDO2 specification says a FIDO2 device can be identified by checking the USB interface (class 3, subclass 0 und protocol 0) and the HID report descriptor (usage page 0xF1D0).
When i connect the yubikey i find it and an interface with the correct class but the usage page in the HID report descriptor is 0x01.
I have one other FIDO2 capable stick from Feitian, this one has the correct interface and the correct usage page.
Do I have to enable FIDO2 on the Yubikey besides enabling the USB FIDO2 interface in the Yubikey manager application?
This is the output of my program for the Feitian stick:
Found a possible Fido2 device: 096E:0858
Usb device:
Device:
Vendor: 096E 'FT'
Product: 0858 'FIDO'
SerialNumber: 'unkn.'
DeviceClass: 00
DeviceSubclass: 00
DeviceProtocol: 00
MaxPacketSize0: 40
Interface #00:
AlternateSetting: 00
NumEndpoints: 02
InterfaceClass: 03
InterfaceSubClass: 00
InterfaceProtocol: 00
Interface: 05
Endpoint #0:
EndpointAddress: 84
Attributes: 03
MaxPacketSize: 0040
Interval: 02
Endpoint #1:
EndpointAddress: 04
Attributes: 03
MaxPacketSize: 0040
Interval: 02
HID report s item (01:00) -> Gobal:Usage Page { D0 F1 }
HID report s item (02:00) -> Local:Usage { 01 }
HID report s item (00:0A) -> Main:Collection (Application) { 01 }
HID report s item (02:00) -> Local:Usage { 20 }
HID report s item (01:01) -> Gobal:Logical Minimum { 00 }
HID report s item (01:02) -> Gobal:Logical Maximum { FF 00 }
HID report s item (01:07) -> Gobal:Report Size { 08 }
HID report s item (01:09) -> Gobal:Report Count { 40 }
HID report s item (00:08) -> Main:Input { 02 }
HID report s item (02:00) -> Local:Usage { 21 }
HID report s item (01:01) -> Gobal:Logical Minimum { 00 }
HID report s item (01:02) -> Gobal:Logical Maximum { FF 00 }
HID report s item (01:07) -> Gobal:Report Size { 08 }
HID report s item (01:09) -> Gobal:Report Count { 40 }
HID report s item (00:09) -> Main:Output { 02 }
HID report s item (00:0C) -> Main:End Collection { }
And this is the output for the Yubikey:
Found a possible Fido2 device: 1050:0407
Usb device:
Device:
Vendor: 1050 'Yubico'
Product: 0407 'YubiKey OTP+FIDO+CCID'
SerialNumber: 'unkn.'
DeviceClass: 00
DeviceSubclass: 00
DeviceProtocol: 00
MaxPacketSize0: 40
Interface #01:
AlternateSetting: 00
NumEndpoints: 02
InterfaceClass: 03
InterfaceSubClass: 00
InterfaceProtocol: 00
Interface: 00
Endpoint #0:
EndpointAddress: 04
Attributes: 03
MaxPacketSize: 0040
Interval: 02
Endpoint #1:
EndpointAddress: 84
Attributes: 03
MaxPacketSize: 0040
Interval: 02
HID report s item (01:00) -> Gobal:Usage Page { 01 }
HID report s item (02:00) -> Local:Usage { 06 }
HID report s item (00:0A) -> Main:Collection (Application) { 01 }
HID report s item (01:00) -> Gobal:Usage Page { 07 }
HID report s item (02:01) -> Local:Usage Minimum { E0 }
HID report s item (02:02) -> Local:Usage Maximum { E7 }
HID report s item (01:01) -> Gobal:Logical Minimum { 00 }
HID report s item (01:02) -> Gobal:Logical Maximum { 01 }
HID report s item (01:07) -> Gobal:Report Size { 01 }
HID report s item (01:09) -> Gobal:Report Count { 08 }
HID report s item (00:08) -> Main:Input { 02 }
HID report s item (01:09) -> Gobal:Report Count { 01 }
HID report s item (01:07) -> Gobal:Report Size { 08 }
HID report s item (00:08) -> Main:Input { 01 }
HID report s item (01:09) -> Gobal:Report Count { 05 }
HID report s item (01:07) -> Gobal:Report Size { 01 }
HID report s item (01:00) -> Gobal:Usage Page { 08 }
HID report s item (02:01) -> Local:Usage Minimum { 01 }
HID report s item (02:02) -> Local:Usage Maximum { 05 }
HID report s item (00:09) -> Main:Output { 02 }
HID report s item (01:09) -> Gobal:Report Count { 01 }
HID report s item (01:07) -> Gobal:Report Size { 03 }
HID report s item (00:09) -> Main:Output { 01 }
HID report s item (01:09) -> Gobal:Report Count { 06 }
HID report s item (01:07) -> Gobal:Report Size { 08 }
HID report s item (01:01) -> Gobal:Logical Minimum { 00 }
HID report s item (01:02) -> Gobal:Logical Maximum { 65 }
HID report s item (01:00) -> Gobal:Usage Page { 07 }
HID report s item (02:01) -> Local:Usage Minimum { 00 }
HID report s item (02:02) -> Local:Usage Maximum { 65 }
HID report s item (00:08) -> Main:Input { 00 }
HID report s item (02:00) -> Local:Usage { 03 }
HID report s item (01:07) -> Gobal:Report Size { 08 }
HID report s item (01:09) -> Gobal:Report Count { 08 }
HID report s item (00:0B) -> Main:Feature { 02 }
HID report s item (00:0C) -> Main:End Collection { }
The problem was that i sent the request for the HID descriptor to the wrong interface, i sent it to interface 0 but it in my configuration i need to send it to interface 1.
Interface 0 is the keyboard interface and Interface 1 is the FIDO2 interface.
Related
TYPO3: I need to add typoscript lines to object with a custom extension
I added an image selection to a content element in my main extension with a custom extension, this field should now be added in the dataProcessing that is performed in the main extension, but it should be added in the custom extension : tt_content.t3bs_carousel < lib.contentElement tt_content.t3bs_carousel { templateName = Carousel templateRootPaths { 9 = {$plugin.tx_t3bs_main.view.templateRootPath}Content/ 8 = EXT:t3bs_main/Resources/Private/Templates/Content/ } dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = assets as = assets } // this 20 should be added by the custom extension 20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 20 { references.fieldName = tx_t3bs_portrait_image as = portrait } 90 > } } if I safe this in the main extension it works, I cannot find a typoscript that makes me add it in my custom extension, I tried to insert the entire object (since my custom extension is loaded after the main), then also only the missing part that needs to be added: tt_content.t3bs_carousel.dataProcessing { 20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 20 { references.fieldName = tx_t3bs_portrait_image as = portrait } }
Tooltip not working correctly with activeIndex on pie charts(ReCharts)
Pie charts that utilize Tooltip and activeIndex do not work correctly. The tooltip will not show up unless you re-enter the same sector. When you are not in the same sector it shows the Warning: Failed prop type: Invalid prop activeIndex supplied to Pie. <PieChart className="pie-chart" width={this.props.width ? this.props.width : 500} height={375} onMouseEnter={this.onPieEnter} > <Pie dataKey="value" data={data} // cx={250} // cy={100} activeIndex={ this.state.activeIndex === undefined ? 0 : this.state.activeIndex } activeShape={this.renderActiveShape} outerRadius={ this.state.width <= 1025 && this.state.width > 768 ? 80 : 100 } innerRadius={ this.state.width <= 1025 && this.state.width > 768 ? 65 : 85 } fill="#8884d8" onMouseEnter={this.onPieEnter} > {data.map((entry, index) => ( <Cell key={index} fill={this.COLORS[index % this.COLORS.length]} /> ))} </Pie> </PieChart> Default active index always set so when you are not in the same sector pie tooltip shows.
When you are not in the same sector then the activeIndex is changed automatically and it returns the object type, and actually, activeIndex is number type so I check for a shouldComponentUpdate method and it returns true if activeIndex is number only. So if the activeIndex type is not a number then component will not be updated and activeIndex state is remains the same as the previous state, so tooltip is not hidden any time. This code works for me. shouldComponentUpdate(nextProps, nextState) { return typeof nextState.activeIndex === "number"; }
TYPO3: Multiple references for fieldName?
Inside a custom content element, I use two fields: image and media My setup.txt looks like this: custom_ce { templateName = CustomCe dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = media } 20 = Vendor\Ext\DataProcessing\CustomCeProcessor } } Currently I managed to process only one field. Is it possible to pass both media and image fields to the filesProcessor ?
You can call a DataProcessor more than once and you can specify the varibale the files are available in your fluid template with the as key: custom_ce { templateName = CustomCe dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = media as = media } 15 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 15 { references.fieldName = image as = image } 20 = Vendor\Ext\DataProcessing\CustomCeProcessor } }
TYPO3 sysext form: get value of selected radio button
I have created a simple form with three radio buttons and one submit button. The radio buttons have integers as value Value of Radio Button #1: 40 Value of Radio Button #2: 41 Value of Radio Button #3: 42 If the user selects radio button #1 for example and presses the submit button, then he should be redirected to the page with ID 40. How can i find out which of the radio buttons is selected and get the value of it? I tried it like this GP:assistent:group1 Whole form configuration: title = test enctype = application/x-www-form-urlencoded method = post prefix = assistent confirmation = postProcessor { 1 = redirect 1 { destination = GP:assistent:group1 } } 10 = RADIOGROUP 10 { class = fieldset-subgroup legend { value = Nächste Schritte } name = group1 10 = RADIO 10 { checked = checked type = radio value = 40 label { value = Ich habe ein Problem mit X } } 20 = RADIO 20 { type = radio value = 41 label { value = Ich habe ein Problem mit Y } } 30 = RADIO 30 { type = radio value = 42 label { value = Ich habe ein Problem mit Z } } } 20 = SUBMIT 20 { type = submit name = 6 value = Weiter }
one solution is to add your Form and grep the GP Parameter. "LOAD_REGISTER" like page.1=TEXT page.1.value ( <form method="get" action=""> <ul> <li><input type="radio" name="myid" value="20" /></li> <li><input type="radio" name="myid" value="30" /></li> </ul> <input type="submit" value="Dummy text"> </form> ) [globalVar = GP:myid >0] page.jsInline { 1234 = TEXT #1234.dataWrap = alert("redirect to:'Location: index.php?id={GP:nameradio}'"); 1234.value = window.location.assign("index.php?id={GP:myid}") 1234.insertData=1 } #or with config.additionalHeaders [global] keep things simple. regards Pete
How to get the list view row count in blackberry 10 cascades qml?
I need to get the no of rows in a list view blackberry 10 cascades qml? The list view data source model type is json. I have tried this ListItem.initialized ? ListItem.view.dataModel.childCount(ListItem.indexPath) : 0 But its displaying only 0 even the list view row count is more than 1. My code dataModel: groupdatamodel listItemComponents: [ ListItemComponent { type: "header" Container { preferredWidth: 748 layout: DockLayout { } Label { text: "Title" base: SystemDefaults.TextStyles.TitleText fontWeight: FontWeight.Bold } } Label { id: subtitle text: groupdatamodel.size() + "Items" textStyle { base: SystemDefaults.TextStyles.SmallText fontWeight: FontWeight.Bold } } ]
Main.qml import bb.cascades 1.0 import bb.data 1.0 Page { content: Container { Label { text: "List View with json parsing" } ListView { id: listViewDemo dataModel: GroupDataModel { grouping: ItemGrouping.None } listItemComponents: [ ListItemComponent { type: "listItem" StandardListItem { title: ListItemData.ThumnailImage description: ListItemData.CategoryID } } ] function itemType(data, indexPath) { return "listItem"; } } } attachedObjects: [ DataSource { id: serviceDataSource source: "contacts.json" type: DataSourceType.Json onDataLoaded: { listViewDemo.dataModel.clear(); listViewDemo.dataModel.insertList(data) } } ] onCreationCompleted: { serviceDataSource.load(); } } Contacts.json [ {"CategoryID":"3","CategoryName":"News","CountryID":"1","Result":"OK"}, {"CategoryID":"4","CategoryName":"Daily Paper","CountryID":"1","Result":"OK"},{"CategoryID":"5","CategoryName":"Thanthi","CountryID":"1","Result":"OK"}, {"CategoryID":"1","CategoryName":"Newspaper","CountryID":"1","Result":"OK"}, {"CategoryID":"2","CategoryName":"Magazine","CountryID":"1","Result":"OK"} ] main.cpp add follwing lines in main file #include <bb/data/DataSource> #include <bb/data/JsonDataAccess> Q_DECL_EXPORT int main(int argc, char **argv) { // We want to use DataSource in QML bb::data::DataSource::registerQmlTypes(); 4.FILENAME.PRO LIBS += -lbbdata
DataModel::childCount(ListItem indexPath) returns the child count for the item in the list specified by indexPath, not the count of data items in the data model (and therefor available to the list). You need to interrogate the actual data model. For example GroupDataModel::size() returns the number of items in the GroupDataModel, similarly for QListDataModel.
I use this code in my project and it works fine: console.log("pcs count" + pcsListModel.childCount(0));
Adding custom elements in label is not possible unless you use custom data model.
you can use: your_groupdatamodel.size().toString(); or your_groupdatamodel.childCount(0); in javascript code. J.