openssl example for D

lzzll ownrepos at gmail.com
Sat Apr 7 11:05:33 PDT 2012


> What exactly are the error messages you get?

dmd test_client.d -w -L-lssl -L-lcrypto -L-ldl && ./test_client
test_client.o: In function 
`_D11test_client10verifyCertFPS6deimos7openssl4x5097x509_stZb':
test_client.d:(.text._D11test_client10verifyCertFPS6deimos7openssl4x5097x509_stZb+0x2e): 
undefined reference to 
`_D6deimos7openssl3pem65__T14DECLARE_PEM_rwVAyaa4_58353039TS6deimos7openssl4x5097x509_stZ67__T16DECLARE_PEM_readVAyaa4_58353039TS6deimos7openssl4x5097x509_stZ71__T20DECLARE_PEM_read_bioVAyaa4_58353039TS6deimos7openssl4x5097x509_stZ17PEM_read_bio_X509UNbPS6deimos7openssl3bio6bio_stPPS6deimos7openssl4x5097x509_stPUPaiiPvZiPvZPS6deimos7openssl4x5097x509_st'
collect2: ld returned 1 exit status
--- errorlevel 1

And sorry for a memory leak problem,
add
X509_free(cert);
before
return true; //or return (cert_hash == some_const_value) to 
verify cert
can fix.


More information about the Digitalmars-d mailing list