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

Myproxy ipv6 #183

Merged
merged 6 commits into from
Apr 20, 2022
Merged

Myproxy ipv6 #183

merged 6 commits into from
Apr 20, 2022

Conversation

ellert
Copy link
Member

@ellert ellert commented Apr 10, 2022

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.

ellert added 2 commits April 10, 2022 11:09
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.
@ellert ellert force-pushed the myproxy-ipv6 branch 2 times, most recently from 9ab1809 to a54556c Compare April 10, 2022 15:36
$ 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.
@ellert
Copy link
Member Author

ellert commented Apr 16, 2022

@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
@ellert ellert force-pushed the myproxy-ipv6 branch 2 times, most recently from 32590cf to 66f629b Compare April 20, 2022 03:59
{
free(tmpfilename);
}

return return_status;
}

Copy link
Member

@fscheiner fscheiner Apr 20, 2022

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.

Copy link
Member

@fscheiner fscheiner left a 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.

@ellert ellert merged commit 519462f into gridcf:master Apr 20, 2022
@ellert ellert deleted the myproxy-ipv6 branch April 20, 2022 13:16
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

Successfully merging this pull request may close these issues.

2 participants