abac0-leakabac0-meimei-idmei-rt0-nmei_rt0tvf-new-xml
Last change
on this file since ff71d24 was
461541a,
checked in by Mei <mei@…>, 11 years ago
|
1) updated original rt0 to remove libstrongswan dependency
a) identity credential being made/accessed with openssl api calls
(X509/EVP_PKEY pem)
b) attribute credential being made/access via xmlsec1 (custom XML
structure)
2) refactored libcreddy into libabac and now one ABAC namespace for
libabac
3) added attribute_rule suboption to creddy's attribute as another way
to insert access rule
4) added some regression tests into example directory
5) updated some docs.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[461541a] | 1 | /* abac_openssl.h */ |
---|
| 2 | |
---|
| 3 | #ifndef __ABAC_OPENSSL_H__ |
---|
| 4 | #define __ABAC_OPENSSL_H__ |
---|
| 5 | |
---|
| 6 | #include <stdio.h> |
---|
| 7 | #include <openssl/x509.h> |
---|
| 8 | #include <openssl/err.h> |
---|
| 9 | |
---|
| 10 | /* ID */ |
---|
| 11 | EVP_PKEY* abac_generate_key(); |
---|
| 12 | X509 *abac_generate_cert(EVP_PKEY *, char*, long); |
---|
| 13 | |
---|
| 14 | // 8 bytes |
---|
| 15 | unsigned char *abac_generate_serial(); |
---|
| 16 | |
---|
| 17 | // |
---|
| 18 | int init_openssl(); |
---|
| 19 | int deinit_openssl(); |
---|
| 20 | |
---|
| 21 | X509 *abac_load_id_from_fp(FILE *); |
---|
| 22 | EVP_PKEY *abac_load_privkey_from_fp(FILE *); |
---|
| 23 | X509 *abac_load_id_from_chunk(unsigned char *, int); |
---|
| 24 | int abac_write_id_to_fp(X509 *cert, FILE *fp); |
---|
| 25 | int abac_write_privkey_to_fp(EVP_PKEY *key, FILE *fp); |
---|
| 26 | |
---|
| 27 | EVP_PKEY *extract_pubkey_from_cert(X509 *); |
---|
| 28 | |
---|
| 29 | unsigned char *abac_string_cert(X509 *); |
---|
| 30 | EVP_PKEY *extract_pubkey_from_cert(X509 *); |
---|
| 31 | unsigned char *abac_string_privkey(EVP_PKEY *); |
---|
| 32 | |
---|
| 33 | char *abac_get_serial(X509 *); |
---|
| 34 | char *abac_get_cn(X509 *); |
---|
| 35 | char *abac_get_subject(X509 *); |
---|
| 36 | char *abac_get_issuer(X509 *); |
---|
| 37 | |
---|
| 38 | // sha of cert |
---|
| 39 | char *abac_get_keyid(X509 *); |
---|
| 40 | |
---|
| 41 | int abac_check_validity(X509 *, struct tm *, struct tm *); |
---|
| 42 | int abac_still_valid(X509 *); |
---|
| 43 | int abac_self_signed(X509 *); |
---|
| 44 | int abac_signed_by(X509 *, X509 *); |
---|
| 45 | |
---|
| 46 | #endif /*__ABAC_OPENSSL_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.