From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.bugs Subject: bug#74423: Low level key events Date: Mon, 2 Dec 2024 17:54:03 +0100 Message-ID: References: <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com> <705fabb8-1ea0-4894-8c32-05097ab822c9@imayhem.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------kdIRyaCiBUPUB4DSQ0iPV24t" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39471"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 74423@debbugs.gnu.org To: Stefan Monnier , Eli Zaretskii , Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 17:55:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tI9hj-000A74-UE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 17:55:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI9hT-0003sh-KR; Mon, 02 Dec 2024 11:55:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI9hP-0003jO-Ah for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 11:55:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tI9hO-0007hK-UJ for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 11:55:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=q4LTAMZq9XdKgdIcpa7X9A1rTPn002/i6z+cKbHQAws=; b=rpg3mIoOuu3R7GvRHTS0ZhJA6vrhXuOfXG7eOYL6ALlgbmpyauHrumw4k1qq69+1IfUO9RPuHEbfcJbyys2kgOL56Y1F0hZgKiDzIo4JK9x/PwgOP+PBVyikHyxycawKHm3cU/HTT6SBuXj9YnaZGo/A3VQ/X74z90AnHZYi4ekbruuzErqZ0Arb30Y4GUyLSFqs8+xBD3PMemvZU0uTQHboE1bK3jhcbERbTeQTxO/qcbNy+R8sDjBf+3kU+3AbzuzaaLgM6Qa7jHFM/RsO1JLukidRBiTFYCQfy8QB3rD+Tj5K7XWXNToo81SRUgDSsF6RjakUzxRkD3SkG0i0Bw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tI9hO-00035q-My for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 11:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Cecilio Pardo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Dec 2024 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74423 X-GNU-PR-Package: emacs Original-Received: via spool by 74423-submit@debbugs.gnu.org id=B74423.173315845911791 (code B ref 74423); Mon, 02 Dec 2024 16:55:02 +0000 Original-Received: (at 74423) by debbugs.gnu.org; 2 Dec 2024 16:54:19 +0000 Original-Received: from localhost ([127.0.0.1]:56362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI9ge-00033s-GQ for submit@debbugs.gnu.org; Mon, 02 Dec 2024 11:54:18 -0500 Original-Received: from mail.imayhem.com ([82.223.54.191]:36863 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI9gY-000333-IW for 74423@debbugs.gnu.org; Mon, 02 Dec 2024 11:54:13 -0500 Original-Received: from [192.168.68.104] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id DB4AF80147; Mon, 2 Dec 2024 16:54:04 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.104] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296340 Archived-At: This is a multi-part message in MIME format. --------------kdIRyaCiBUPUB4DSQ0iPV24t Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Here is a new version of the patch. Sorry it took so long. It addresses most of the notes I got: Notes by Po Lu: - I think now the associated modifier for a key is computed properly, with or without XKB for plain X, and for gtk. - 'ralt' not generated for ISO_Level3_Shift. This will have to stay like this. What we know about the keys if what the system lets us. - Don't call x_any_window_to_frame if already called for the event. Notes by Eli: - Change testing for Venable_low_level_key_events. This variable now is more complex. Notes by Stefan: - Created and used event-* functions to access event. - Only one event with both pieces of information. - Selection of keys. Now the variable enable-low-level-key-events can be used to select exactly which keys we want to process. - About creating lisp object in handle_one_xevent, it is done in other events too. The lisp interface is as follows: - A list of variables with keysym values is initialized (xk-*), so the user can select keys, not just modifiers. - Users can bind globally commands or functions with llk-bind to taps. - To use a tapped key as a new modifier, this works: (llk-bind 'tap 'xk-shift-r (lambda () (message "H-...") (setq unread-command-events (append (event-apply-hyper-modifier nil) nil)))) - Added the function describe-low-level-key to see what keysym/modifier it triggers. This is implemented for X, pgtkw and MS-Windows. The pgtj implementation detects that a key is a modifier to filter it, but can't decide which one it its. --------------kdIRyaCiBUPUB4DSQ0iPV24t Content-Type: text/plain; charset=UTF-8; name="0001-Send-event-for-key-presses-and-key-releases.patch" Content-Disposition: attachment; filename="0001-Send-event-for-key-presses-and-key-releases.patch" Content-Transfer-Encoding: base64 RnJvbSA4NjMwNjhmNGUxZTE4N2JhMzMzODJjMGRlYmI4Y2FlZTViYmU1Y2JlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDZWNpbGlvIFBhcmRvIDxjcGFyZG9AaW1heWhlbS5j b20+CkRhdGU6IE1vbiwgMiBEZWMgMjAyNCAxNzozMDo0MiArMDEwMApTdWJqZWN0OiBbUEFU Q0hdIFNlbmQgZXZlbnQgZm9yIGtleSBwcmVzc2VzIGFuZCBrZXkgcmVsZWFzZXMuCgpEZXRl Y3QgZG91YmxlL3RyaXBlIHRhcHMuCgoqIHNyYy9ndGt1dGlsLmMgKHhnX2NyZWF0ZV9mcmFt ZV93aWRnZXRzKTogTW9kaWZpZWQgdG8gaGFuZGxlIGtleQpyZWxlYXNlIGV2ZW50cy4KKHhn X21heWJlX3NlbmRfbG93X2xldmVsX2tleV9ldmVudCk6IE5ldyBmdW5jdGlvbiB0aGF0IHNl bmRzIGtleQpldmVudHMuCih4Z193aWRnZXRfa2V5X3ByZXNzX2V2ZW50X2NiKTogTW9kaWZp ZWQgdG8gc2VuZCBsb3cgbGV2ZWwga2V5IGV2ZW50cy4KKHhnX3dp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zNSkgOzsgWEtfNQorICAoZGVmaW5lLXhrIHhrLTYgICAgICAgICAgICN4 MDAzNiAjeDM2KSA7OyBYS182CisgIChkZWZpbmUteGsgeGstNyAgICAgICAgICAgI3gwMDM3 ICN4MzcpIDs7IFhLXzcKKyAgKGRlZmluZS14ayB4ay04ICAgICAgICAgICAjeDAwMzggI3gz OCkgOzsgWEtfOAorICAoZGVmaW5lLXhrIHhrLTkgICAgICAgICAgICN4MDAzOSAjeDM5KSA7 OyBYS185CisgIChkZWZpbmUteGsgeGstYSAgICAgICAgICAgI3gwMDQxICN4NDEpIDs7IFhL X0EKKyAgKGRlZmluZS14ayB4ay1iICAgICAgICAgICAjeDAwNDIgI3g0MikgOzsgWEtfQgor ICAoZGVmaW5lLXhrIHhrLWMgICAgICAgICAgICN4MDA0MyAjeDQzKSA7OyBYS19DCisgIChk ZWZpbmUteGsgeGstZCAgICAgICAgICAgI3gwMDQ0ICN4NDQpIDs7IFhLX0QKKyAgKGRlZmlu ZS14ayB4ay1lICAgICAgICAgICAjeDAwNDUgI3g0NSkgOzsgWEtfRQorICAoZGVmaW5lLXhr IHhrLWYgICAgICAgICAgICN4MDA0NiAjeDQ2KSA7OyBYS19GCisgIChkZWZpbmUteGsgeGst ZyAgICAgICAgICAgI3gwMDQ3ICN4NDcpIDs7IFhLX0cKKyAgKGRlZmluZS14ayB4ay1oICAg ICAgICAgICAjeDAwNDggI3g0OCkgOzsgWEtfSAorICAoZGVmaW5lLXhrIHhrLWkgICAgICAg ICAgICN4MDA0OSAjeDQ5KSA7OyBYS19JCisgIChkZWZpbmUteGsgeGstaiAgICAgICAgICAg I3gwMDRBICN4NEEpIDs7IFhLX0oKKyAgKGRlZmluZS14ayB4ay1rICAgICAgICAgICAjeDAw NEIgI3g0QikgOzsgWEtfSworICAoZGVmaW5lLXhrIHhrLWwgICAgICAgICAgICN4MDA0QyAj eDRDKSA7OyBYS19MCisgIChkZWZpbmUteGsgeGstbSAgICAgICAgICAgI3gwMDREICN4NEQp IDs7IFhLX00KKyAgKGRlZmluZS14ayB4ay1uICAgICAgICAgICAjeDAwNEUgI3g0RSkgOzsg WEtfTgorICAoZGVmaW5lLXhrIHhrLW8gICAgICAgICAgICN4MDA0RiAjeDRGKSA7OyBYS19P CisgIChkZWZpbmUteGsgeGstcCAgICAgICAgICAgI3gwMDUwICN4NTApIDs7IFhLX1AKKyAg KGRlZmluZS14ayB4ay1xICAgICAgICAgICAjeDAwNTEgI3g1MSkgOzsgWEtfUQorICAoZGVm aW5lLXhrIHhrLXIgICAgICAgICAgICN4MDA1MiAjeDUyKSA7OyBYS19SCisgIChkZWZpbmUt eGsgeGstcyAgICAgICAgICAgI3gwMDUzICN4NTMpIDs7IFhLX1MKKyAgKGRlZmluZS14ayB4 ay10ICAgICAgICAgICAjeDAwNTQgI3g1NCkgOzsgWEtfVAorICAoZGVmaW5lLXhrIHhrLXUg ICAgICAgICAgICN4MDA1NSAjeDU1KSA7OyBYS19VCisgIChkZWZpbmUteGsgeGstdiAgICAg ICAgICAgI3gwMDU2ICN4NTYpIDs7IFhLX1YKKyAgKGRlZmluZS14ayB4ay13ICAgICAgICAg ICAjeDAwNTcgI3g1NykgOzsgWEtfVworICAoZGVmaW5lLXhrIHhrLXggICAgICAgICAgICN4 MDA1OCAjeDU4KSA7OyBYS19YCisgIChkZWZpbmUteGsgeGsteSAgICAgICAgICAgI3gwMDU5 ICN4NTkpIDs7IFhLX1kKKyAgKGRlZmluZS14ayB4ay16ICAgICAgICAgICAjeDAwNUEgI3g1 QSkpOzsgWEtfWgorCisoZGVmdW4gbGxrLWluaXQgKCkKKyAgIkluaXRpYWxpemUgbG93LWxl dmVsIGtleSBldmVudHMuCitGaWxscyB0aGUgYGxsay1rZXlzeW1zJyBsaXN0LCBhbmQgYmlu ZHMgdGhlIGBsb3ctbGV2ZWwta2V5JyBldmVudAordG8gdGhlIGBsbGstaGFuZGxlJyBmdW5j dGlvbi4gIFJlc2V0cyB0aGUgYGxsay1iaW5kaW5ncycgb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V2ZW50LXRpbWUgKGV2ZW50 KQorICAiUmV0dXJuIHRoZSB2YWx1ZSBvZiB0aGUgVElNRSBmaWVsZCBvZiB0aGUgRVZFTlQs IGEgbG93IGxldmVsIGtleSBldmVudC4iCisgIChkZWNsYXJlIChzaWRlLWVmZmVjdC1mcmVl IHQpKQorICAoaWYgKGNvbnNwIGV2ZW50KSAobnRoIDQgZXZlbnQpKSkKKworOzsgRm9yIGV4 YW1wbGU6Cis7OyBCaW5kIGtleSB0YXAgdG8gY29tbWFuZAorOzsgICAgKGxsay1iaW5kICd0 YXAgJ3hrLXNoaWZ0LWwgJ2RlbGV0ZS1vdGhlci13aW5kb3dzKQorOzsgQmluZCBtb2RpZmly eSB0YXAgdG8gY29tbWFuZAorOzsgICAgIChsbGstYmluZCAndGFwICdzaGlmdCAnZGVsZXRl LW90aGVyLXdpbmRvd3MpCis7OyBCaW5kIHRhcCB0byBoeXBlciBtb2RpZmllcgorOzsgICAg ICAobGxrLWJpbmQgJ3RhcCAneGstc2hpZnQtciAobGFtYmRhICgpCis7OyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChtZXNzYWdlICJILS4uLiIpCis7OyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChzZXRxIHVucmVhZC1jb21tYW5kLWV2ZW50cworOzsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYXBwZW5kIChldmVudC1hcHBseS1oeXBl ci1tb2RpZmllciBuaWwpIG5pbCkpKSkKKzs7IENhbiBiaW5kIHRvIGEgY29tbWFuZCBvciBm dW5jdGlvbgorKGRlZnVuIGxsay1iaW5kIChhY3Rpb24ga2V5IGZ1bmN0aW9uKQorICAiQmlu ZCBhIGNvbW1hbmQgYSBmdW5jdGlvbiB0byBhIGxvdyBsZXZlbCBrZXkgZXZlbnQuCitUaGUg b25seSBhY3Rpb24gc3VwcG9ydGVkIGN1cnJlbnRseSBpcyBgdGFwJy4gVGhlIGtleSBjYW4g YmUgYSBrZXlzeW0K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N5bWJvbCBmb3IgdGhpcyBrZXksIHVzZSBpdHMg a2V5c3ltIG51bWJlcgorICAgICh1bmxlc3Mga2V5c3ltIChzZXRxIGtleXN5bSAoZXZlbnQt a2V5c3ltIGxhc3QtaW5wdXQtZXZlbnQpKSkKKworICAgIDs7IGxvb2sgaW4gbGxrLXRhcC1r ZXlzIGZvciB0aGUga2V5LCB0aGVuIHRoZSBtb2RpZmllcgorICAgIChpZiAobWVtYmVyIGtl eXN5bSBsbGstdGFwLWtleXMpCisgICAgICAgIChzZXRxIGtleSBrZXlzeW0pCisgICAgICAo aWYgKG1lbWJlciBtb2RpZmllciBsbGstdGFwLWtleXMpCisgICAgICAgICAgKHNldHEga2V5 IG1vZGlmaWVyKSkpCisKKyAgICAoaWYgKG5vdCBrZXkpCisgICAgICAgIDs7IEtleSBub3Qg aW4gdGFwIGxpc3QsIGNsZWFyIGhpc3RvcnkKKyAgICAgICAgKHNldHEgbGxrLWV2ZW50cyBu aWwpCisgICAgICA7OyBDbGVhciBpdCBhbHNvIGlmIHRoZSBmaXJzdCBlbGVtZW50IGlzIGZy b20gYSBkaWZmZXJlbnQga2V5CisgICAgICAoYW5kIGxsay1ldmVudHMKKyAgICAgICAgICAg KG5vdCAoZXF1YWwgKGNhciAoY2FyIGxsay1ldmVudHMpKSBrZXkpKQorICAgICAgICAgICAo c2V0cSBsbGstZXZlbnRzIG5pbCkpCisgICAgICAocHVzaCAobGlzdCBrZXkgaXMtcHJlc3Mg dGltZXN0YW1wKSBsbGstZXZlbnRzKQorICAgICAgOzsgT25seSBjYXJlIGFib3V0IGxhc3Qg MnhOIGV2ZW50cworICAgICAgKG50YWtlICgqIDIgbikgbGxrLWV2ZW50cykKKyAgICAgIDs7 IElmIHdlIGhhdmU6CisgICAgICA7OyAtIEV4YWN0bHkgMiAqIG4gZXZlbnRzLgorICAgICAg OzsgLSBkb3duLCB1cCwgZG93biwgdXAsIC4uLgorICAgICAgOzsgLSBub3QgdHdvIG11Y2gg dGltZSBiZXR3ZWVuIGZpcnN0IGFuZCBsYXN0CisgICAgICAoYW5kIChlcSAoKiAyIG4pIChs ZW5ndGggbGxrLWV2ZW50cykpCisgICAgICAgICAgIChjbC1ldmVyeSAnZXEKKyAgICAgICAg ICAgICAgICAgICAgIChudGFrZSAoKiAyIG4pCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGxpc3QgbmlsIHQgbmlsIHQgbmlsIHQgbmlsIHQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBuaWwgdCBuaWwgdCBuaWwgdCBuaWwgdCkpCisgICAgICAgICAgICAg ICAgICAgICAobWFwY2FyICdjbC1zZWNvbmQgbGxrLWV2ZW50cykpCisgICAgICAgICAgICg8 ICgtIChjbC10aGlyZCAoY2wtZmlyc3QgbGxrLWV2ZW50cykpCisgICAgICAgICAgICAgICAg IChjbC10aGlyZCAoY2FyIChsYXN0IGxsay1ldmVudHMpKSkpCisgICAgICAgICAgICAgIHRp bWVvdXQpCisgICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgIChzZXRxIGxsay1ldmVu dHMgbmlsKQorICAgICAgICAgICAgIGtleSkpKSkpCisKKyhkZWZ1biBkZXNjcmliZS1sb3ct bGV2ZWwta2V5ICgpCisgICJXYWl0IGZvciB0aGUgbmV4dCBrZXkgcHJlc3MgYW5kIGRlc2Ny aWJlIHRoZSBsb3cgbGV2ZWwga2V5IGV2ZW50IGl0CitnZW5lcmF0ZXMuIgorICAoaW50ZXJh Y3RpdmUpCisgIChzZXRxIGxsay1kZXNjcmliZS1uZXh0LXByZXNzIHQpKQorCisoZGVmdW4g bGxrLXNob3ctZXZlbnQtZGVzY3JpcHRpb24gKCkKKyAgIlNob2UgaW5mb3JtYXRpb24gYWJv dXQgdGhlIGxhc3QgbG93IGxldmVsIGtleSBldmVudC4iCisgIChzZXRxIGxsay1kZXNjcmli ZS1uZXh0LXByZXNzIG5pbCkKKyAgKHdpdGgtaGVscC13aW5kb3cgKGhlbHAtYnVmZmV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QorICAgICAgICAgICBsbGstZGVzY3JpYmUtbmV4dC1wcmVz cykKKyAgICAgIChsbGstc2hvdy1ldmVudC1kZXNjcmlwdGlvbikKKyAgICAobGV0ICgodGFw LWtleSAobGxrLWRldGVjdC1uLXRhcAorICAgICAgICAgICAgICAgICAgICBsbGstdGFwLWNv dW50CisgICAgICAgICAgICAgICAgICAgIGxsay10YXAtdGltZW91dCkpKQorICAgICAgKHdo ZW4gdGFwLWtleQorICAgICAgICAobGV0ICgoZnVuYyAoY2wtdGhpcmQKKyAgICAgICAgICAg ICAgICAgICAgIChzZXEtZmluZAorICAgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKGIp CisgICAgICAgICAgICAgICAgICAgICAgICAoYW5kIChlcSAoY2wtZmlyc3QgYikgJ3RhcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxIChjbC1zZWNvbmQgYikgdGFwLWtl eSkpKQorICAgICAgICAgICAgICAgICAgICAgIGxsay1iaW5kaW5ncykpKSkKKyAgICAgICAg ICAoY29uZAorICAgICAgICAgICAoKGNvbW1hbmRwIGZ1bmMpIChjYWxsLWludGVyYWN0aXZl bHkgZnVuYykpCisgICAgICAgICAgICgoZnVuY3Rpb25wIGZ1bmMpIChmdW5jYWxsIGZ1bmMp KSkpKSkpKQpkaWZmIC0tZ2l0IGEvc3JjL2d0a3V0aWwuYyBiL3NyYy9ndGt1dGlsLmMKaW5k ZXggZDU3NjI3ZjE1MmYuLjg2ZDQzMjFjZjM1IDEwMDY0NAotLS0gYS9zcmMvZ3RrdXRpbC5j CisrKyBiL3NyYy9ndGt1dGlsLmMKQEAgLTk4LDYgKzk4LDcgQEAgR19ERUZJTkVfVFlQRSAo RW1hY3NNZW51QmFyLCBlbWFjc19tZW51X2JhciwgR1RLX1RZUEVfTUVOVV9CQVIpCiBzdGF0 aWMgdm9pZCB4Z19pbV9jb250ZXh0X3ByZWVkaXRfY2hhbmdlZCAoR3RrSU1Db250ZXh0ICos IGdwb2ludGVy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CAoc3RydWN0IGZyYW1lICpmLAorCQkJCSAgIEdka0V2ZW50ICp4ZXYpCit7Cisg IEdka0V2ZW50S2V5IHhrZXkgPSB4ZXYtPmtleTsKKyAgYm9vbCBpc19wcmVzczsKKyAgTGlz cF9PYmplY3Qga2V5LCBtb2RpZmllcjsKKyAgdW5pb24gYnVmZmVyZWRfaW5wdXRfZXZlbnQg aW5ldjsKKworICBpZiAoTklMUCAoVmVuYWJsZV9sb3dfbGV2ZWxfa2V5X2V2ZW50cykpCisg ICAgcmV0dXJuOworCisgIHN3aXRjaCAoeGV2LT50eXBlKQorICAgIHsKKyAgICBjYXNlIEdE S19LRVlfUFJFU1M6CisgICAgICBpc19wcmVzcyA9IHRydWU7CisgICAgICBicmVhazsKKyAg ICBjYXNlIEdES19LRVlfUkVMRUFTRToKKyAgICAgIGlzX3ByZXNzID0gZmFsc2U7CisgICAg ICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgcmV0dXJuOworICAgIH0KKworICBtb2Rp ZmllciA9IHhfZ2V0X21vZGlmaWVyX2Zvcl9rZXljb2RlIChGUkFNRV9PVVRQVVRfREFUQSAo ZiktPmRpc3BsYXlfaW5mbywKKwkJCQkJIHhldi0+a2V5LmhhcmR3YXJlX2tleWNvZGUpOwor CisgIGludCBrZXlzeW0gPSB4a2V5LmtleXZhbDsKKworICBpZiAoa2V5c3ltID49IEdES19L RVlfYSAmJiBrZXlzeW0gPD0gR0RLX0tFWV96KQorICAgIGtleXN5bSAtPSBHREtfS0VZX2Eg LSBHREtfS0VZX0E7CisKKyAgaWYgKCFrYmRfbG93X2xldmVsX2tleV9pc19lbmFibGVkIChr ZXlzeW0sIG1vZGlmaWVyKSkKKyAgICByZXR1cm47CisKKyAga2V5ID0gbWFrZV9maXhudW0g KGtleXN5bSk7CisKKyAgRVZFTlRfSU5JVCAoaW5ldi5pZSk7CisgIFhTRVRGUkFNRSAoaW5l di5pZS5mcmFtZV9vcl93aW5kb3csIGYpOworICBpbmV2LmllLm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LCBNQVBWS19WU0NfVE9fVktfRVgpOworCSAgICAgIFdPUkQgdmsgPSBMT1dPUkQgKG1z Zy5tc2cud1BhcmFtKTsKKwkgICAgICBpZiAodHJhbnNsYXRlZCkKKwkJdmsgPSBMT1dPUkQg KHRyYW5zbGF0ZWQpOworCisJICAgICAgTGlzcF9PYmplY3Qga2V5ID0gbWFrZV9maXhudW0g KHZrKTsKKwkgICAgICBMaXNwX09iamVjdCBtb2RpZmllciA9IFFuaWw7CisKKwkgICAgICBz d2l0Y2ggKHZrKQorCQl7CisJCWNhc2UgVktfTFNISUZUOgorCQljYXNlIFZLX1JTSElGVDoK KwkJICBtb2RpZmllciA9IFFzaGlmdDsKKwkJICBicmVhazsKKwkJY2FzZSBWS19MQ09OVFJP TDoKKwkJY2FzZSBWS19SQ09OVFJPTDoKKwkJICBtb2RpZmllciA9IFFjdHJsOworCQkgIGJy ZWFrOworCQljYXNlIFZLX0xNRU5VOgorCQljYXNlIFZLX1JNRU5VOgorCQkgIG1vZGlmaWVy ID0gUW1ldGE7CisJCSAgYnJlYWs7CisJCX0KKworCSAgICAgIGlmIChrYmRfbG93X2xldmVs X2tleV9pc19lbmFibGVkICh2aywgbW9kaWZpZXIpKQorCQl7CisJCSAgZiA9IHczMl93aW5k b3dfdG9fZnJhbWUgKGRweWluZm8sIG1zZy5tc2cuaHduZCk7CisJCSAgaW5ldi5raW5kID0g TE9XX0xFVkVMX0tFWV9FVkVOVDsKKwkJICBYU0VURlJBTUUgKGluZXYuZnJhbWVfb3Jfd2lu ZG93LCBmKTsKKwkJICBpbmV2LnRpbWVzdGFtcCA9IG1zZy5tc2cudGltZTsKKwkJICBpbmV2 LmFyZyA9IGxpc3QzIChpc193bV9rZXl1cCA/IFFuaWwgOiBRdCwga2V5LCBtb2RpZmllcik7 CisJCSAga2JkX2J1ZmZlcl9zdG9yZV9ldmVudF9ob2xkICgmaW5ldiwgaG9sZF9xdWl0KTsK KwkJfQorCisJICAgICAgaW5ldi5raW5kID0gTk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yAgTGlzcF9PYmplY3Qga2V5LCBtb2Rp ZmllcjsKKyAgc3RydWN0IGlucHV0X2V2ZW50IGllOworCisgIGlmIChOSUxQIChWZW5hYmxl X2xvd19sZXZlbF9rZXlfZXZlbnRzKSkKKyAgICByZXR1cm47CisKKyAgc3dpdGNoICh4ZXYt PnR5cGUpCisgICAgeworICAgIGNhc2UgS2V5UHJlc3M6CisgICAgICBpc19wcmVzcyA9IHRy dWU7CisgICAgICB4a2V5ID0geGV2LT54a2V5OworICAgICAgYnJlYWs7CisgICAgY2FzZSBL ZXlSZWxlYXNlOgorICAgICAgaXNfcHJlc3MgPSBmYWxzZTsKKyAgICAgIHhrZXkgPSB4ZXYt PnhrZXk7CisgICAgICBicmVhazsKKyNpZmRlZiBIQVZFX1hJTlBVVDIKKyAgICBjYXNlIEdl bmVyaWNFdmVudDoKKyAgICAgIFhJRGV2aWNlRXZlbnQgKnhpZXYgPSB4ZXYtPnhjb29raWUu ZGF0YTsKKyAgICAgIHN3aXRjaCAoeGV2LT54Z2VuZXJpYy5ldnR5cGUpCisJeworCWNhc2Ug WElfS2V5UHJlc3M6CisJICBpc19wcmVzcyA9IHRydWU7CisJICBicmVhazsKKwljYXNlIFhJ X0tleVJlbGVhc2U6CisJICBpc19wcmVzcyA9IGZhbHNlOworCSAgYnJlYWs7CisJZGVmYXVs dDoKKwkgIHJldHVybjsKKwl9CisKKyAgICAgIHhrZXkuc2VyaWFsID0geGlldi0+c2VyaWFs OworICAgICAgeGtleS5zZW5kX2V2ZW50ID0geGlldi0+c2VuZF9ldmVudDsKKyAgICAgIHhr ZXkuZGlzcGxheSA9IHhpZXYtPmRpc3BsYXk7CisgICAgICB4a2V5LndpbmRvdyA9IHhpZXYt PmV2ZW50OworICAgICAgeGtleS5yb290ID0geGlldi0+cm9vdDsKKyAgICAgIHhrZXkuc3Vi d2luZG93ID0geGlldi0+Y2hpbGQ7CisgICAgICB4a2V5LnRpbWUgPSB4aWV2LT50aW1lOwor ICAgICAgeGtleS54ID0geGlldi0+ZXZlbnRfeDsKKyAgICAgIHhrZXkueSA9IHhpZXYtPmV2 ZW50X3k7CisgICAgICB4a2V5Lnhfcm9vdCA9IHhpZXYtPnJvb3RfeDsKKyAgICAgIHhrZXku eV9yb290ID0geGlldi0+cm9vdF95OworICAgICAgeGtleS5zdGF0ZSA9IHhpZXYtPm1vZHMu ZWZmZWN0aXZlOworICAgICAgeGtleS5rZXljb2RlID0geGlldi0+ZGV0YWlsOworICAgICAg eGtleS5zYW1lX3NjcmVlbiA9IDE7CisgICAgICBicmVhazsKKyNlbmRpZgorICAgIGRlZmF1 bHQ6CisgICAgICByZXR1cm47CisgICAgfQorCisgIGlmICghZikKKyAgICBmID0geF9hbnlf d2luZG93X3RvX2ZyYW1lIChkcHlpbmZvLCB4a2V5LndpbmRvdyk7CisgIGlmICghZikKKyAg ICByZXR1cm47CisKKyAgWExvb2t1cFN0cmluZyAoJnhrZXksIE5VTEwsIDAsICZrZXlzeW0s IE5VTEwpOworCisgIG1vZGlmaWVyID0geF9nZXRfbW9kaWZpZXJfZm9yX2tleWNvZGUgKGRw eWluZm8sIHhrZXkua2V5Y29kZSk7CisKKyAgLyogQ29udmVydCBsb3dlcmNhc2UgbGF0aW4g bGV0dGVyIHRvIHVwcGVyY2FzZS4gICovCisgIGlmIChrZXlzeW0gPj0gWEtfYSAmJiBrZXlz eW0gPD0gWEtfeikKKyAgICBrZXlzeW0gLT0gWEtfYSAtIFhLX0E7CisKKyAgaWYgKCFrYmRf bG93X2xldmVsX2tleV9pc19lbmFibGVkIChrZXlzeW0sIG1vZGlmaWVyKSkKKyAgICByZXR1 cm47CisKKyAga2V5ID0gbWFrZV9maXhudW0gKGtleXN5bSk7CisKKyAgRVZFTlRfSU5JVCAo aWUpOworICBYU0VURlJBTUUgKGllLmZyYW1lX29yX3dpbmRvdywgZik7CisgIGllLmtpbmQg PSBMT1dfTEVWRUxfS0VZX0VWRU5UOworICBpZS50aW1lc3RhbXAgPSB4a2V5LnRpbW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