Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with -s | --sign param #46

Open
daygr opened this issue Jan 26, 2017 · 6 comments
Open

Issue with -s | --sign param #46

daygr opened this issue Jan 26, 2017 · 6 comments

Comments

@daygr
Copy link

daygr commented Jan 26, 2017

I have been using repose as part of the aurutils package, and have a local repository which is signed with my private key, said key is also the default key for pacman and has been locally signed. I had to manually sign the db for the repository with gpg, as repose -s repo_name causes a segfault.

/path/to/repo % repose -s repo 
[1]    13349 segmentation fault (core dumped)  repose -s repo

gdb output is vague, I am not sure where else to look.

(gdb) r
Starting program: /usr/bin/repose
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
repose: incorrect number of arguments provided
@vodik
Copy link
Owner

vodik commented Jan 30, 2017

Indeed something is screwed up here. Seems like repose is also generating invalid signatures too. It doesn't crash on me, but when i try to do another operation on the signed database I get "unexpected validity 0x0" (probably something wrong with my key)...

I'll have a quick look.

@vodik
Copy link
Owner

vodik commented Jan 30, 2017

Can you give me any details on how you generated the particular key that's crashing on you? If not, might not see a resolution until #45 lands and signing gets replaced (making good progress - shouldn't be more than a week or two).

The existing gpgme code is nasty...

@daygr
Copy link
Author

daygr commented Jan 30, 2017

This is the top of my pgpdump;

Old: Secret Key Packet(tag 5)(1862 bytes)
        Ver 4 - new
        Public key creation time - Wed Nov 12 17:43:28 EST 2014
        Pub alg - RSA Encrypt or Sign(pub 1)
        RSA n(4096 bits) - ...
        RSA e(17 bits) - ...
        Sym alg - AES with 128-bit key(sym 7)
        Iterated and salted string-to-key(s2k 3):
                Hash alg - SHA1(hash 2)
                Salt - b1 cd 9d 38 57 4f 9a 1f
                Count - 24117248(coded count 231)
        IV - 3b 3f 9f b2 6f 94 d3 68 83 02 47 1c 4e e0 c8 4c
        Encrypted RSA d
        Encrypted RSA p
        Encrypted RSA q
        Encrypted RSA u
        Encrypted SHA1 hash
Old: User ID Packet(tag 13)(26 bytes)
        User ID - Greg Day <gday@cryptic.li>
... etc signatures ...

That was back in 2014 before I started obsessively saving my zsh history, so I don't have more details than that.

@AladW
Copy link

AladW commented Jan 30, 2017

Considering a rewrite is being done, this might be an opportune moment to ask something I've been wondering about for a while: what are the reasons for keeping signing in repose to begin with, rather than use gpg manually? e.g. if you wanted to use a different key for signing packages than your default key (see aurutils/aurutils#198) or other edge cases, you'd have to move back to gpg anyway or implement these features in the project. If the correct path of the database regarding signing is an issue, you could instead have repose print the absolute path on stdout after the database was updated.

Perhaps I'm missing some finer issues here, and apologies if this strays too far from the topic at hand.

@daygr
Copy link
Author

daygr commented Jan 30, 2017

@AladW Glad you commented. I was considering opening an issue for aurutils about this as well. I had to remove the repose -s flag in the aurbuild script (line 61) to use my signed database. Packages are added and signed, still, though I had to manually sign the repository, as mentioned.

@vodik
Copy link
Owner

vodik commented Jan 30, 2017

Yeah, its certainly something worth discussing. Seriously, the only reason it was added in the first place was because repo-add does it, at once upon a time I aimed to support being a repo-add drop in replacement as well as my own standalone tool.

Backwards compatibility was dropped because of the nightmare of maintaining the vodik.db to vodik.db.tar.gz symlinks, and it was probably for the better (I don't think anyone used it either).

AladW pushed a commit to aurutils/aurutils that referenced this issue Jan 30, 2017
+ Use xargs with find to ensure >0 exit code on gpg failure
+ Sign database manually, see vodik/repose#46
  This assumes that the database extension is .db, then so do pacman et al.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants