Skip to content

Commit

Permalink
Use consistent case in signature and key messages
Browse files Browse the repository at this point in the history
The signature and key related messages are a historical mess of
inconsistency, we have at least the following in closely related messages
that happen under slightly different circumstances:
- Header V4 RSA/SHA256 Signature
- RSA signature: NOTFOUND
- signatures OK
- key ID
- Key Fingerprint

Just use lower case consistently for everything but acronyms, so the
above becomes
- Header V4 RSA/SHA256 signature
- RSA signature: NOTFOUND
- signatures OK
- key ID
- key fingerprint

This will no doubt break somebody's fine-tuned script but we're breaking
them in 6.0 anyhow so this is the right time for this kind of cleanup.
  • Loading branch information
pmatilai committed Nov 5, 2024
1 parent ac25837 commit bab388d
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion lib/rpmvs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ char *rpmsinfoMsg(struct rpmsinfo_s *sinfo)
fphex = rpmPubkeyFingerprintAsHex(sinfo->key);
}
if (fphex) {
rasprintf(&fpmsg, _(", Key Fingerprint: %s"), fphex);
rasprintf(&fpmsg, _(", key fingerprint: %s"), fphex);
char * pos = strstr(descr, ", key ID");
if (pos)
*pos = '\0';
Expand Down
2 changes: 1 addition & 1 deletion rpmio/rpmpgp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ char *pgpIdentItem(pgpDigParams digp)
pgpDigParamsAlgo(digp, PGPVAL_PUBKEYALGO)),
pgpValString(PGPVAL_HASHALGO,
pgpDigParamsAlgo(digp, PGPVAL_HASHALGO)),
(pgpSignatureType(digp) == -1) ? "Public Key" : "Signature",
(pgpSignatureType(digp) == -1) ? "public key" : "signature",
signid);
free(signid);
} else {
Expand Down
16 changes: 8 additions & 8 deletions tests/rpmi.at
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
],
[0],
[],
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
])
RPMTEST_CLEANUP

Expand All @@ -308,8 +308,8 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
],
[1],
[],
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
package hello-2.0-1.x86_64 does not verify: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
package hello-2.0-1.x86_64 does not verify: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
])
RPMTEST_CLEANUP

Expand Down Expand Up @@ -387,7 +387,7 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
],
[1],
[],
[error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: BAD
[error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: BAD
error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header SHA256 digest: BAD (Expected ef920781af3bf072ae9888eec3de1c589143101dff9cc0b561468d395fb766d9 != 29fdfe92782fb0470a9a164a6c94af87d3b138c63b39d4c30e0223ca1202ba82)
error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header SHA1 digest: BAD (Expected 5cd9874c510b67b44483f9e382a1649ef7743bac != 4261b2c1eb861a4152c2239bce20bfbcaa8971ba)
error: /tmp/hello-2.0-1.x86_64-signed.rpm cannot be installed
Expand Down Expand Up @@ -434,19 +434,19 @@ runroot rpm -U --ignorearch --ignoreos --nodeps --noverify \
],
[1],
[INSTALL 1
warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
error: unpacking of archive failed: cpio: Bad magic
error: hello-2.0-1.x86_64: install failed
INSTALL 2
error: unpacking of archive failed: cpio: Bad magic
error: hello-2.0-1.x86_64: install failed
INSTALL 3
warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
package hello-2.0-1.x86_64 does not verify: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
package hello-2.0-1.x86_64 does not verify: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
INSTALL 4
package hello-2.0-1.x86_64 does not verify: no signature
INSTALL 5
warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
error: unpacking of archive failed: cpio: Bad magic
error: hello-2.0-1.x86_64: install failed
],
Expand Down
4 changes: 2 additions & 2 deletions tests/rpmpython.at
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ public key not available
public key not available
public key not available
],
[warning: /data/RPMS/hello-2.0-1.x86_64-signed-with-subkey.rpm: Header V4 RSA/SHA512 Signature, key ID 1f71177215217ee0: NOKEY
warning: /data/RPMS/hello-2.0-1.x86_64-signed-with-subkey.rpm: Header V4 RSA/SHA512 Signature, key ID 1f71177215217ee0: NOKEY]
[warning: /data/RPMS/hello-2.0-1.x86_64-signed-with-subkey.rpm: Header V4 RSA/SHA512 signature, key ID 1f71177215217ee0: NOKEY
warning: /data/RPMS/hello-2.0-1.x86_64-signed-with-subkey.rpm: Header V4 RSA/SHA512 signature, key ID 1f71177215217ee0: NOKEY]
)

RPMPY_TEST([transaction callback 1],[
Expand Down
2 changes: 1 addition & 1 deletion tests/rpmquery.at
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ runroot rpm \
],
[0],
[RSA/SHA256, Thu Apr 6 13:02:33 2017, Key ID 4344591e1964c5fc],
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 4344591e1964c5fc: NOKEY
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 signature, key ID 4344591e1964c5fc: NOKEY
])
RPMTEST_CLEANUP

Expand Down
Loading

0 comments on commit bab388d

Please sign in to comment.