To get a clue what I'm talking about - Scheme:
Code: Select all
ProcedureC test(session.i)
If good
ProcedureReturn(0)
Else
ProcedureReturn(-43)
Endif
EndProcedure
; Do some cert init stuff...
gnutls_certificate_set_verify_function(xcred,@test()) ; here i specify gnutls my PB function as verify-function
; Init TLS-session, connect, set transport pointer to socket...
gnutls_handshake(session) ; here test() is called... if test() returns 0 gnutls_handshake should be happy else it should return failure
Edit: Found the solution myself. I've compiled on linux 64bit while it was just 32bit on windows. The returnvalue of gnutls_handhake is C int. However using int in PB means 64bit size type. So I did not get 0 or < 0 as documented on GnuTLS docs and expected and checked by me but a value > 0 instead. Changing my variable that carries the return-value from PB int to PB long solved the problem.
Greetings,
auser
