diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-08-21 17:08:57 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-08-21 17:08:57 +0000 |
| commit | 9bfb9d9ed22bfbfec2ff49c73cb1994b2ea5981a (patch) | |
| tree | 862034cc30fef482378e6d8447ba5521885352eb /PICA_client.c | |
| parent | 255f83d5109d7ddeab1c9a343292f2cfbcf10651 (diff) | |
| download | pica-pica-9bfb9d9ed22bfbfec2ff49c73cb1994b2ea5981a.tar.gz pica-pica-9bfb9d9ed22bfbfec2ff49c73cb1994b2ea5981a.zip | |
pica-node modified to handle new id format, new files PICA_id.c PICA_id.h containing functions for working with id
git-svn-id: svn://localhost/project_picapica/trunk@263 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'PICA_client.c')
| -rwxr-xr-x | PICA_client.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/PICA_client.c b/PICA_client.c index 8d31e50..03d8c21 100755 --- a/PICA_client.c +++ b/PICA_client.c @@ -98,24 +98,7 @@ if (tmp1==tmp2) return 1; } */ -int get_id_from_X509(X509 *x, unsigned char *id) -{ -unsigned char *der = NULL; -int len; - -len = i2d_X509(x, &der); - -if (len <= 0) -{ - return 0; -} - -SHA224(der, len, id); - -OPENSSL_free(der); -return 1; -} int PICA_get_id_from_cert_file(const char *cert_file, unsigned char *id) { @@ -138,7 +121,7 @@ if (!x) return 0; } -return get_id_from_X509(x, id); +return PICA_id_from_X509(x, id); } static int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) @@ -282,7 +265,7 @@ if (!chnl->peer_cert) { unsigned char temp_id[PICA_ID_SIZE]; -if (get_id_from_X509(chnl->peer_cert, temp_id) == 0) +if (PICA_id_from_X509(chnl->peer_cert, temp_id) == 0) { err_ret=PICA_ERRNOPEERCERT; goto error_ret_; |
