comparison Plugins/Include/orthanc/OrthancCPlugin.h @ 2022:fefbe71c2272

Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 17 Jun 2016 17:09:50 +0200
parents 9c9332e486ca
children 9f61ca1e3eb3
comparison
equal deleted inserted replaced
2021:bd143a77eb7a 2022:fefbe71c2272
4944 const char* password; 4944 const char* password;
4945 uint32_t timeout; 4945 uint32_t timeout;
4946 const char* certificateFile; 4946 const char* certificateFile;
4947 const char* certificateKeyFile; 4947 const char* certificateKeyFile;
4948 const char* certificateKeyPassword; 4948 const char* certificateKeyPassword;
4949 uint8_t pkcs11;
4949 } _OrthancPluginCallHttpClient2; 4950 } _OrthancPluginCallHttpClient2;
4950 4951
4951 4952
4952 4953
4953 /** 4954 /**
4973 * (can be <tt>NULL</tt> if no client certificate or if not using HTTPS). 4974 * (can be <tt>NULL</tt> if no client certificate or if not using HTTPS).
4974 * @param certificateKeyFile Path to the key of the client certificate for HTTPS, in PEM format 4975 * @param certificateKeyFile Path to the key of the client certificate for HTTPS, in PEM format
4975 * (can be <tt>NULL</tt> if no client certificate or if not using HTTPS). 4976 * (can be <tt>NULL</tt> if no client certificate or if not using HTTPS).
4976 * @param certificateKeyPassword Password to unlock the key of the client certificate 4977 * @param certificateKeyPassword Password to unlock the key of the client certificate
4977 * (can be <tt>NULL</tt> if no client certificate or if not using HTTPS). 4978 * (can be <tt>NULL</tt> if no client certificate or if not using HTTPS).
4979 * @param pkcs11 Enable PKCS#11 client authentication for hardware security modules and smart cards.
4978 * @return 0 if success, or the error code if failure. 4980 * @return 0 if success, or the error code if failure.
4979 **/ 4981 **/
4980 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpClient( 4982 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpClient(
4981 OrthancPluginContext* context, 4983 OrthancPluginContext* context,
4982 OrthancPluginMemoryBuffer* target, 4984 OrthancPluginMemoryBuffer* target,
4991 const char* username, 4993 const char* username,
4992 const char* password, 4994 const char* password,
4993 uint32_t timeout, 4995 uint32_t timeout,
4994 const char* certificateFile, 4996 const char* certificateFile,
4995 const char* certificateKeyFile, 4997 const char* certificateKeyFile,
4996 const char* certificateKeyPassword) 4998 const char* certificateKeyPassword,
4999 uint8_t pkcs11)
4997 { 5000 {
4998 _OrthancPluginCallHttpClient2 params; 5001 _OrthancPluginCallHttpClient2 params;
4999 memset(&params, 0, sizeof(params)); 5002 memset(&params, 0, sizeof(params));
5000 5003
5001 params.target = target; 5004 params.target = target;
5011 params.password = password; 5014 params.password = password;
5012 params.timeout = timeout; 5015 params.timeout = timeout;
5013 params.certificateFile = certificateFile; 5016 params.certificateFile = certificateFile;
5014 params.certificateKeyFile = certificateKeyFile; 5017 params.certificateKeyFile = certificateKeyFile;
5015 params.certificateKeyPassword = certificateKeyPassword; 5018 params.certificateKeyPassword = certificateKeyPassword;
5019 params.pkcs11 = pkcs11;
5016 5020
5017 return context->InvokeService(context, _OrthancPluginService_CallHttpClient2, &params); 5021 return context->InvokeService(context, _OrthancPluginService_CallHttpClient2, &params);
5018 } 5022 }
5019 5023
5020 5024