Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: include/crypto.h

Issue 6659006: flimflam: add support for multiple profiles (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/flimflam.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * 2 *
3 * Crypto plugin API. 3 * Crypto plugin API.
4 * 4 *
5 * This file initially created by Google, Inc. 5 * This file initially created by Google, Inc.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 * 10 *
(...skipping 24 matching lines...) Expand all
35 * @short_description: Functions for registering crypto modules 35 * @short_description: Functions for registering crypto modules
36 */ 36 */
37 37
38 #define CONNMAN_CRYPTO_PRIORITY_LOW -100 38 #define CONNMAN_CRYPTO_PRIORITY_LOW -100
39 #define CONNMAN_CRYPTO_PRIORITY_DEFAULT 0 39 #define CONNMAN_CRYPTO_PRIORITY_DEFAULT 0
40 #define CONNMAN_CRYPTO_PRIORITY_HIGH 100 40 #define CONNMAN_CRYPTO_PRIORITY_HIGH 100
41 41
42 struct connman_crypto { 42 struct connman_crypto {
43 const char *name; 43 const char *name;
44 int priority; 44 int priority;
45 char *(*encrypt_keyvalue) (const char *profile_name, 45 char *(*encrypt_keyvalue) (const char *key, const char *value);
46 const char *key, const char *value); 46 char *(*decrypt_keyvalue) (const char *key, const char *value);
47 char *(*decrypt_keyvalue) (const char *profile_name,
48 const char *key, const char *value);
49 47
50 /* 48 /*
51 * The prefix is the module name + ':', and is used a prefix for 49 * The prefix is the module name + ':', and is used a prefix for
52 * the encrypted value when it is written to a KeyFile. Both 50 * the encrypted value when it is written to a KeyFile. Both
53 * prefix and prefix_size are computed from the module name when it 51 * prefix and prefix_size are computed from the module name when it
54 * is registered, you should not populate them on your own. 52 * is registered, you should not populate them on your own.
55 */ 53 */
56 char *prefix; 54 char *prefix;
57 gsize prefix_size; 55 gsize prefix_size;
58 }; 56 };
59 57
60 int connman_crypto_register(struct connman_crypto *crypto); 58 int connman_crypto_register(struct connman_crypto *crypto);
61 void connman_crypto_unregister(struct connman_crypto *crypto); 59 void connman_crypto_unregister(struct connman_crypto *crypto);
62 60
63 #ifdef __cplusplus 61 #ifdef __cplusplus
64 } 62 }
65 #endif 63 #endif
66 64
67 #endif /* __CONNMAN_CRYPTO_H */ 65 #endif /* __CONNMAN_CRYPTO_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698