Compare Key ID of RPM package with Key Fingerprint of RPM-GPG-KEYGnuPG : representations of key IDs and...
How do solar inverter systems easily add AC power sources together?
Biological refrigeration?
Is it unusual for a math department not to have a mail/web server?
What stops you from using fixed income in developing countries?
What will be the immediate action by the pilot and ATC if any plane blocks the runway while landing?
助けてくれて有難う meaning and usage
Could the UK amend the European Withdrawal Act and revoke the Article 50 invocation?
Why does the weaker C–H bond have a higher wavenumber than the C=O bond?
Why did James Cameron decide to give Alita big eyes?
Why does the `ls` command sort files like this?
Why does this London Underground poster from 1924 have a Star of David atop a Christmas tree?
What was the point of "Substance"?
Can I lend at the federal funds rate?
Is there any problem with a full installation on a USB drive?
Did the Apollo Guidance Computer really use 60% of the world's ICs in 1963?
Stolen MacBook should I worry about my data?
Which meaning of "must" does the Slow spell use?
Book featuring a child learning from a crowdsourced AI book
Did anybody find out it was Anakin who blew up the command center?
Can I use coax outlets for cable modem?
Pen test results for web application include a file from a forbidden directory that is not even used or referenced
Count the number of triangles
How to pass 2>/dev/null as a variable?
Videos of surgery
Compare Key ID of RPM package with Key Fingerprint of RPM-GPG-KEY
GnuPG : representations of key IDs and fingerprintsHow do I tell which GPG key an RPM package was signed with?RPM package naming conventionPublic key not found for RPMVerify a package installed with yum --nogpgcheck having gpg keyHow to automatically accept epel gpg keyGPG key import stuck at “gpg: keybox '/root/.gnupg/pubring.kbx' created” / Getting “gpg: keyserver receive failed”How do I get the fingerprint of an ASCII-armored PGP secret key with gpg?GPG Lost Secret Keywhich part is the fingerprint in gpg public key
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
During work with RPM packages I frequently need to validate signatures against available GPG keys.
Using
rpm -qip --nosignature <package.rpm> | grep Signature
gives me an Key ID, i.e.:
Signature : RSA/SHA1, Mon 28. Aug 2019 06:00:00 AM CET, Key ID 1234567890abcdef
whereby
gpg --with-fingerprint <RPM-GPG-KEY-package>
gives me a Key Fingerprint:
Key fingerprint = 0987 6543 21FE DCBA 0987 6543 21FE 1234 5678 90AB CDEF
Since it is not easy to compare both outputs, how to get the mentioned Key ID instead of the whole fingerprint?
rpm gpg key-authentication
add a comment |
During work with RPM packages I frequently need to validate signatures against available GPG keys.
Using
rpm -qip --nosignature <package.rpm> | grep Signature
gives me an Key ID, i.e.:
Signature : RSA/SHA1, Mon 28. Aug 2019 06:00:00 AM CET, Key ID 1234567890abcdef
whereby
gpg --with-fingerprint <RPM-GPG-KEY-package>
gives me a Key Fingerprint:
Key fingerprint = 0987 6543 21FE DCBA 0987 6543 21FE 1234 5678 90AB CDEF
Since it is not easy to compare both outputs, how to get the mentioned Key ID instead of the whole fingerprint?
rpm gpg key-authentication
add a comment |
During work with RPM packages I frequently need to validate signatures against available GPG keys.
Using
rpm -qip --nosignature <package.rpm> | grep Signature
gives me an Key ID, i.e.:
Signature : RSA/SHA1, Mon 28. Aug 2019 06:00:00 AM CET, Key ID 1234567890abcdef
whereby
gpg --with-fingerprint <RPM-GPG-KEY-package>
gives me a Key Fingerprint:
Key fingerprint = 0987 6543 21FE DCBA 0987 6543 21FE 1234 5678 90AB CDEF
Since it is not easy to compare both outputs, how to get the mentioned Key ID instead of the whole fingerprint?
rpm gpg key-authentication
During work with RPM packages I frequently need to validate signatures against available GPG keys.
Using
rpm -qip --nosignature <package.rpm> | grep Signature
gives me an Key ID, i.e.:
Signature : RSA/SHA1, Mon 28. Aug 2019 06:00:00 AM CET, Key ID 1234567890abcdef
whereby
gpg --with-fingerprint <RPM-GPG-KEY-package>
gives me a Key Fingerprint:
Key fingerprint = 0987 6543 21FE DCBA 0987 6543 21FE 1234 5678 90AB CDEF
Since it is not easy to compare both outputs, how to get the mentioned Key ID instead of the whole fingerprint?
rpm gpg key-authentication
rpm gpg key-authentication
asked 30 mins ago
U880DU880D
4325 silver badges17 bronze badges
4325 silver badges17 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
During research I've found that the Key ID are usually the last 8 or 16 bytes of the Key Fingerprint. So I wanted to extract just them from the output. How to achieve that?
I've found the following approach which seems to be working:
keyID.sh
#! /bin/bash
KEY_PATH=$1
KEY_FINGERPRINT=$(gpg --with-fingerprint ${KEY_PATH} | grep "Key fingerprint" | cut -d "=" -f 2 | tr -d ' ' | tr '[:upper:]' '[:lower:]')
echo ${KEY_FINGERPRINT} | grep -o '.{8}$'
echo ${KEY_FINGERPRINT} | grep -o '.{16}$'
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f537795%2fcompare-key-id-of-rpm-package-with-key-fingerprint-of-rpm-gpg-key%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
During research I've found that the Key ID are usually the last 8 or 16 bytes of the Key Fingerprint. So I wanted to extract just them from the output. How to achieve that?
I've found the following approach which seems to be working:
keyID.sh
#! /bin/bash
KEY_PATH=$1
KEY_FINGERPRINT=$(gpg --with-fingerprint ${KEY_PATH} | grep "Key fingerprint" | cut -d "=" -f 2 | tr -d ' ' | tr '[:upper:]' '[:lower:]')
echo ${KEY_FINGERPRINT} | grep -o '.{8}$'
echo ${KEY_FINGERPRINT} | grep -o '.{16}$'
add a comment |
During research I've found that the Key ID are usually the last 8 or 16 bytes of the Key Fingerprint. So I wanted to extract just them from the output. How to achieve that?
I've found the following approach which seems to be working:
keyID.sh
#! /bin/bash
KEY_PATH=$1
KEY_FINGERPRINT=$(gpg --with-fingerprint ${KEY_PATH} | grep "Key fingerprint" | cut -d "=" -f 2 | tr -d ' ' | tr '[:upper:]' '[:lower:]')
echo ${KEY_FINGERPRINT} | grep -o '.{8}$'
echo ${KEY_FINGERPRINT} | grep -o '.{16}$'
add a comment |
During research I've found that the Key ID are usually the last 8 or 16 bytes of the Key Fingerprint. So I wanted to extract just them from the output. How to achieve that?
I've found the following approach which seems to be working:
keyID.sh
#! /bin/bash
KEY_PATH=$1
KEY_FINGERPRINT=$(gpg --with-fingerprint ${KEY_PATH} | grep "Key fingerprint" | cut -d "=" -f 2 | tr -d ' ' | tr '[:upper:]' '[:lower:]')
echo ${KEY_FINGERPRINT} | grep -o '.{8}$'
echo ${KEY_FINGERPRINT} | grep -o '.{16}$'
During research I've found that the Key ID are usually the last 8 or 16 bytes of the Key Fingerprint. So I wanted to extract just them from the output. How to achieve that?
I've found the following approach which seems to be working:
keyID.sh
#! /bin/bash
KEY_PATH=$1
KEY_FINGERPRINT=$(gpg --with-fingerprint ${KEY_PATH} | grep "Key fingerprint" | cut -d "=" -f 2 | tr -d ' ' | tr '[:upper:]' '[:lower:]')
echo ${KEY_FINGERPRINT} | grep -o '.{8}$'
echo ${KEY_FINGERPRINT} | grep -o '.{16}$'
answered 26 mins ago
U880DU880D
4325 silver badges17 bronze badges
4325 silver badges17 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f537795%2fcompare-key-id-of-rpm-package-with-key-fingerprint-of-rpm-gpg-key%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown