-
Notifications
You must be signed in to change notification settings - Fork 30
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
Myproxy ipv6 #183
Myproxy ipv6 #183
Conversation
Clean up code before doing changes. This commit does not change the code. (git diff --ignore-all-space shows nothing.)
Use BIO_new_ssl and attach the socket to it, instead of using BIO_new_ssl_connect which creates a new connection. The old code sometimes failed if, e.g. we have created an IPv6 socket and the connect BIO tries to create an IPv4 socket and the server doesn't accept IPv4 connections. The OpenSSL version in RHEL/CentOS 7 can use an existing IPv6 socket if it is attached, but its connect BIO is IPv4 only and can not create new IPv6 sockets.
9ab1809
to
a54556c
Compare
$ myproxy-store -V myproxy-init version MYPROXYv2 (v6.2 Aug 2021 PAM SASL KRB5 LDAP VOMS OCSP)
server uses the write to file then rename the file scheme to ensure that the file buffers are written to disk. However, when writing the modified credential to disk after a request to change its passphrase this is not done. This commit implements the scheme for this case too.
private key without using a passphrase, let a failure be an indication that the private key is encrypted regardless of what error code is returned. The current code checks the error code against a set of error codes that are considered as an indication that the private key is encrypted and treats an error code not in the set as an error. However, when trying to read an encrypted private key without using a passphrase, the parsing can fail in a variety of ways resulting in different error codes. At least the following errors not in the current set have been seen: ASN1_R_WRONG_TAG, ASN1_R_HEADER_TOO_LONG and ASN1_R_TOO_LONG. But just adding these three to the set is not a guarantee that the set will be complete. Better not try to check the error code, and treat any failure as an indication that the private key is encrypted.
@fscheiner : I added two more commits to this PR because they are for myproxy too, and if I made a second PR it would conflict with this one since the would both add to the myproxy changlogs in the packaging directory. |
integers, and its presence cancels the '0' modifier. $ perl -e 'print sprintf "%010.d\n", 5' 5 $ perl -e 'print sprintf "%010d\n", 5' 0000000005
32590cf
to
66f629b
Compare
{ | ||
free(tmpfilename); | ||
} | ||
|
||
return return_status; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Here I mean the originally different behavior for writing credentials to disk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, let's merge this.
This is a fix for the trust root retrieval feature in the myproxy client.
The PR has three commits. The first has no actual code changes (white space changes only). The second smaller one has the actual changes. The third just fixes a cut and paste error.