Changeset 06c86d7


Ignore:
Timestamp:
May 22, 2013 1:41:31 PM (6 years ago)
Author:
Mei <mei@…>
Branches:
mei-rt0-n
Parents:
309d500
Message:

i1) trying to get in sync with master

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • examples/creddy_tests/display.ck

    r7e07118 r06c86d7  
    33# display.ck
    44
    5 result=`diff -I "PRIVATE KEY" display.out display.save 2>/dev/null |wc -l`
     5result=`diff display.out display.save 2>/dev/null |wc -l`
    66
    7 if [ $result -eq 34 ]; then
     7if [ $result -eq 22 ]; then
    88    return 0
    99else
     
    1111fi
    1212
    13 
    14 # ignore many sets of
    15 #5,7c5,7
    16 #<     Not before: 2013-05-06 18:40:31 PST [1367894431]
    17 #<     Not after:  2016-04-20 18:40:31 PST [1461206431]
    18 #< 11979:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    19 #---
    20 #>     Not before: 2013-05-06 18:39:25 PST [1367894365]
    21 #>     Not after:  2016-04-20 18:39:25 PST [1461206365]
    22 #> 11951:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    23 #
  • examples/creddy_tests/display.save

    r9e063cb r06c86d7  
    33Subject: /CN=Acme
    44Validity:
    5     Not before: 2013-05-08 20:12:53 PST [1368072773]
    6     Not after:  2016-04-22 20:12:53 PST [1461384773]
    7 28446:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    8 Acme_private.pem:1: parser error : Start tag expected, '<' not found
    9 -----BEGIN RSA PRIVATE KEY-----
    10 ^
     5    Not before: 2013-05-22 19:57:54 PST [1369281474]
     6    Not after:  2016-05-06 19:57:54 PST [1462593474]
    117creddy: Couldn't load Acme_private.pem as an ID or attribute,
    12 28447:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    138Validity:
    14     Not before: 2013-05-08 20:13:04 GMT [1368072784]
    15     Not after:  2014-05-08 20:12:57 GMT [1399608777]
    16 Roles: 5639e92427f692ad37b5b7d5f21d34e581e4ae64.buy_rockets<-5639e92427f692ad37b5b7d5f21d34e581e4ae64.preferred_customer
    17 28448:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
     9    Not before: 2013-05-22 19:57:56 GMT [1369281476]
     10    Not after:  2014-05-22 19:57:56 GMT [1400817476]
     11Roles: 2e8d2520cc5b6dc189f656f7a809cc67986f0095.buy_rockets<-2e8d2520cc5b6dc189f656f7a809cc67986f0095.preferred_customer
    1812Validity:
    19     Not before: 2013-05-08 20:13:04 GMT [1368072784]
    20     Not after:  2014-05-08 20:12:57 GMT [1399608777]
    21 Roles: 5639e92427f692ad37b5b7d5f21d34e581e4ae64.preferred_customer<-82b8765c1bc26c986654ffdfe217dab4806b2232
    22 I/O warning : failed to load external entity "bad_attr.xml"
     13    Not before: 2013-05-22 19:57:56 GMT [1369281476]
     14    Not after:  2014-05-22 19:57:56 GMT [1400817476]
     15Roles: 2e8d2520cc5b6dc189f656f7a809cc67986f0095.preferred_customer<-cf597d70a65996e34d7c7cc7f4a0ad3a3752efd5
    2316creddy: Couldn't load bad_attr.xml as an ID or attribute,
  • examples/creddy_tests/keyid.ck

    r14eea4a r06c86d7  
    44
    55q=`diff -q keyid.out keyid.save 2>/dev/null |grep -c differ`
    6 result=`diff -I "PEM routines:PEM_read_bio:no start line" keyid.out keyid.save 2>/dev/null |wc -l`
     6result=`diff keyid.out keyid.save 2>/dev/null |wc -l`
    77
    8 if [ $q -eq 1 -a $result -eq 6 ]; then
     8if [ $q -eq 1 -a $result -eq 4 ]; then
    99    return 0
    1010else
     
    1212fi
    1313
    14 
    15 # ignore
    16 #
    17 #< 615eb760e357ac4bd010dd4cab41c6734c07280f
    18 #< 10947:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    19 #---
    20 #> cb53efdb302f06bcbcd6166d28b10f7bad994a74
    21 #> 10868:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    22 #5c5
    23 #< 10948:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    24 #---
    25 #> 10869:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    26 #
    27 #
    28 
  • examples/creddy_tests/keyid.save

    r9e063cb r06c86d7  
    11---running keyid
    2 5639e92427f692ad37b5b7d5f21d34e581e4ae64
    3 28416:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
     225b1d02791ad1d3b981e6cdf08f38cd5d2aa2adb
    43creddy: Couldn't load ID cert from Acme_private.pem
    5 28417:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting: CERTIFICATE
    64creddy: Couldn't load ID cert from Acme_buy_rockets__Acme_preferred_customer_attr.xml
    75creddy: Couldn't load ID cert from bad_attr.xml
  • libabac/abac.hh

    ra02c849 r06c86d7  
    200200
    201201/***
    202 f  std::vector<Attribute> query(char *, char *, bool &)
     202f  std::vector<Credential> query(char *, char *, bool &)
    203203     run the query:
    204204        role <-?- principal
     
    225225            }
    226226/***
    227 f  std::vector<Attribute> credentials(bool &)
     227f  std::vector<Credential> credentials(bool &)
    228228     returns a vector of all the credentials loaded in the context
    229229     (C:abac_context_credentials)
  • libabac/abac_openssl.c

    ra02c849 r06c86d7  
    4343/***********************************************************************/
    4444int init_openssl() {
    45     ERR_load_crypto_strings();
     45    if(debug) ERR_load_crypto_strings();
    4646    OpenSSL_add_all_algorithms();
    4747    return 0;
     
    184184
    185185    if (cert == NULL) {
    186         ERR_print_errors_fp (stderr);
     186        if(debug) ERR_print_errors_fp (stderr);
    187187        return NULL;
    188188    }
     
    203203
    204204    if (n509 == NULL) {
    205         ERR_print_errors_fp (stderr);
     205        if(debug) ERR_print_errors_fp (stderr);
    206206        return NULL;
    207207    }
     
    214214
    215215    if(!PEM_write_X509(fp,cert)) {
    216         ERR_print_errors_fp (stderr);
     216        if(debug) ERR_print_errors_fp (stderr);
    217217        return 1;
    218218    }
     
    289289                       privkey);
    290290  if (err != 1) {
    291       ERR_print_errors_fp (stderr);
     291      if(debug) ERR_print_errors_fp (stderr);
    292292      return 1;
    293293  }
     
    313313
    314314  if (err != 1) {
    315         ERR_print_errors_fp (stderr);
     315        if(debug) ERR_print_errors_fp (stderr);
    316316        return 1;
    317317  }
     
    365365
    366366    if (nkey == NULL) {
    367         ERR_print_errors_fp (stderr);
     367        if(debug) ERR_print_errors_fp (stderr);
    368368        return NULL;
    369369    }
     
    378378
    379379    if (privkey == NULL) {
    380         ERR_print_errors_fp (stderr);
     380        if(debug) ERR_print_errors_fp (stderr);
    381381        return NULL;
    382382    }
     
    389389
    390390    if(!PEM_write_PrivateKey(fp,key,NULL,NULL,0,NULL, NULL)) {
    391         ERR_print_errors_fp (stderr);
     391        if(debug) ERR_print_errors_fp (stderr);
    392392        return 1;
    393393    }
     
    400400
    401401    if(!PEM_write_PrivateKey(fp,key,NULL,NULL,0,_potato_cb, "privateKey to file")) {
    402         ERR_print_errors_fp (stderr);
     402        if(debug) ERR_print_errors_fp (stderr);
    403403        return 1;
    404404    }
     
    437437
    438438    if((pk=EVP_PKEY_new()) == NULL){
    439         ERR_print_errors_fp (stderr);
     439        if(debug) ERR_print_errors_fp (stderr);
    440440        return NULL;
    441441    }
     
    444444    RSA *rsa=RSA_generate_key(keysize,RSA_F4,NULL,NULL);
    445445    if (!EVP_PKEY_assign_RSA(pk,rsa)) {
    446         ERR_print_errors_fp (stderr);
     446        if(debug) ERR_print_errors_fp (stderr);
    447447        return NULL;
    448448    }
Note: See TracChangeset for help on using the changeset viewer.