Libgit2 return not wanted error: libgit2 was not built with OpenSSL support #873

Open
opened 2022-01-12 08:42:04 -06:00 by dbadura · 0 comments
dbadura commented 2022-01-12 08:42:04 -06:00 (Migrated from github.com)

When you run following code:

func TestLibGit2InitError(t *testing.T) {
	// the more time pass, the possibility of openssl init error occurrence is smaller, because something cleans it
	time.Sleep(3 * time.Microsecond)
	//if sleep is set to less than 3 um, then we have a high possibility of noticid git openssl init error
	gitErr := git2go.MakeGitError2(int(git2go.ErrorCodeNotFound))
	fmt.Println(gitErr)
}

Git2go sometimes return correct error, sometimes return "libgit2 was not built with OpenSSL support".
It depends on sleep duration.

I have got the same results with following versions:

  • libgit2-dev libgit2-1.1/now 1.1.0+dfsg.1-4 amd64 [installed,local]
  • libgit2-dev/experimental,now 1.3.0+dfsg.1-1 amd64 [installed]

I found that following code is executed:
https://github.com/libgit2/libgit2/blob/main/src/streams/openssl.c#L741

When you run following code: ``` func TestLibGit2InitError(t *testing.T) { // the more time pass, the possibility of openssl init error occurrence is smaller, because something cleans it time.Sleep(3 * time.Microsecond) //if sleep is set to less than 3 um, then we have a high possibility of noticid git openssl init error gitErr := git2go.MakeGitError2(int(git2go.ErrorCodeNotFound)) fmt.Println(gitErr) } ``` Git2go sometimes return correct error, sometimes return "libgit2 was not built with OpenSSL support". It depends on sleep duration. I have got the same results with following versions: * libgit2-dev libgit2-1.1/now 1.1.0+dfsg.1-4 amd64 [installed,local] * libgit2-dev/experimental,now 1.3.0+dfsg.1-1 amd64 [installed] I found that following code is executed: https://github.com/libgit2/libgit2/blob/main/src/streams/openssl.c#L741
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#873
No description provided.