updates.
[runtime.git] / lib / silccore / silcauth.h
index a7a74a5a8011c847289b31274242b6e076e3d988..1e55d264885e8a4514b8388d8c4c15200ac17d2f 100644 (file)
@@ -24,6 +24,9 @@
 /* Forward declaration of the Authentication Payload */
 typedef struct SilcAuthPayloadStruct *SilcAuthPayload;
 
+/* Forward declaration of the Key Agreement Payload */
+typedef struct SilcKeyAgreementPayloadStruct *SilcKeyAgreementPayload;
+
 /* Authentication method type */
 typedef unsigned short SilcAuthMethod;
 
@@ -45,11 +48,28 @@ SilcBuffer silc_auth_payload_encode(SilcAuthMethod method,
                                    unsigned char *auth_data,
                                    unsigned short auth_len);
 void silc_auth_payload_free(SilcAuthPayload payload);
-SilcBuffer silc_auth_public_key_auth_generate(SilcPKCS pkcs,
-                                             SilcHash hash);
-int silc_auth_public_key_auth_verify(SilcAuthPayload paylaod,
-                                    SilcPKCS pkcs, SilcHash hash);
+SilcBuffer silc_auth_public_key_auth_generate(SilcPublicKey public_key,
+                                             SilcHash hash,
+                                             void *id, SilcIdType type);
+int silc_auth_public_key_auth_verify(SilcAuthPayload payload,
+                                    SilcPublicKey public_key, SilcHash hash,
+                                    void *id, SilcIdType type);
 int silc_auth_public_key_auth_verify_data(SilcBuffer payload,
-                                         SilcPKCS pkcs, SilcHash hash);
+                                         SilcPublicKey public_key, 
+                                         SilcHash hash,
+                                         void *id, SilcIdType type);
+int silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
+                    void *auth_data, unsigned int auth_data_len, 
+                    SilcHash hash, void *id, SilcIdType type);
+int silc_auth_verify_data(unsigned char *payload, unsigned int payload_len,
+                         SilcAuthMethod auth_method, void *auth_data,
+                         unsigned int auth_data_len, SilcHash hash, 
+                         void *id, SilcIdType type);
+SilcKeyAgreementPayload silc_key_agreement_payload_parse(SilcBuffer buffer);
+SilcBuffer silc_key_agreement_payload_encode(char *hostname,
+                                            unsigned int port);
+void silc_key_agreement_payload_free(SilcKeyAgreementPayload payload);
+char *silc_key_agreement_get_hostname(SilcKeyAgreementPayload payload);
+unsigned int silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
 
 #endif