summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/cppc_acpi.c
AgeCommit message (Expand)Author
2017-05-08scripts/spelling.txt: add regsiter -> register spelling mistakeStephen Boyd
2017-04-18ACPI / CPPC: add sysfs entries for CPPC perf capabilitiesPrakash, Prashanth
2017-04-18ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps()Prakash, Prashanth
2016-12-12ACPI / CPPC: Fix per-CPU pointer management in acpi_cppc_processor_probe()Rafael J. Wysocki
2016-12-12ACPI / CPPC: Fix crash in acpi_cppc_processor_exit()Sebastian Andrzej Siewior
2016-11-30ACPI / CPPC: set an error code on probe error pathDan Carpenter
2016-09-17ACPI / CPPC: Support PCC with interrupt flagHoan Tran
2016-09-08ACPI / CPPC: Add prefix cppc to cpudata structure nameSrinivas Pandruvada
2016-09-08ACPI / CPPC: Add support for functional fixed hardware addressSrinivas Pandruvada
2016-08-31ACPI / CPPC: check for error bit in PCC status fieldPrakash, Prashanth
2016-08-31ACPI / CPPC: move all PCC related information into pcc_dataPrakash, Prashanth
2016-08-31ACPI / CPPC: add sysfs support to compute delivered performanceAshwin Chaugule
2016-08-31ACPI / CPPC: set a non-zero value for transition_latencyPrakash, Prashanth
2016-08-31ACPI / CPPC: support for batching CPPC requestsPrakash, Prashanth
2016-08-31ACPI / CPPC: acquire pcc_lock only while accessing PCC subspacePrakash, Prashanth
2016-08-31ACPI / CPPC: restructure read/writes for efficient sys mapped reg opsAshwin Chaugule
2016-06-25ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid dataHoan Tran
2016-06-23ACPI: CPPC: Return error if _CPC is invalid on a CPUHoan Tran
2016-03-09ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sentPrakash, Prashanth
2016-03-09ACPI / CPPC: replace writeX/readX to PCC with relaxed versionPrakash, Prashanth
2016-03-09ACPI / CPPC: optimized cpc_read and cpc_writePrakash, Prashanth
2016-03-09ACPI / CPPC: Optimize PCC Read Write operationsAshwin Chaugule
2015-11-20Merge branches 'pm-cpufreq' and 'acpi-cppc'Rafael J. Wysocki
2015-11-14ACPI / CPPC: Use h/w reduced version of the PCCT structureAshwin Chaugule
2015-10-26ACPI / CPPC: Fix potential memory leakAshwin Chaugule
2015-10-26ACPI / CPPC: signedness bug in register_pcc_channel()Dan Carpenter
2015-10-12ACPI: Introduce CPU performance controls using CPPCAshwin Chaugule
ht .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* Simple S/MIME encrypt example */
#include <openssl/pem.h>
#include <openssl/pkcs7.h>
#include <openssl/err.h>

int main(int argc, char **argv)
{
    BIO *in = NULL, *out = NULL, *tbio = NULL;
    X509 *rcert = NULL;
    STACK_OF(X509) *recips = NULL;
    PKCS7 *p7 = NULL;
    int ret = 1;

    /*
     * On OpenSSL 0.9.9 only:
     * for streaming set PKCS7_STREAM
     */
    int flags = PKCS7_STREAM;

    OpenSSL_add_all_algorithms();
    ERR_load_crypto_strings();

    /* Read in recipient certificate */
    tbio = BIO_new_file("signer.pem", "r");

    if (!tbio)
        goto err;

    rcert = PEM_read_bio_X509(tbio, NULL, 0, NULL);

    if (!rcert)
        goto err;

    /* Create recipient STACK and add recipient cert to it */
    recips = sk_X509_new_null();

    if (!recips || !sk_X509_push(recips, rcert))
        goto err;

    /*
     * sk_X509_pop_free will free up recipient STACK and its contents so set
     * rcert to NULL so it isn't freed up twice.
     */
    rcert = NULL;

    /* Open content being encrypted */

    in = BIO_new_file("encr.txt", "r");

    if (!in)
        goto err;

    /* encrypt content */
    p7 = PKCS7_encrypt(recips, in, EVP_des_ede3_cbc(), flags);

    if (!p7)
        goto err;

    out = BIO_new_file("smencr.txt", "w");
    if (!out)
        goto err;

    /* Write out S/MIME message */
    if (!SMIME_write_PKCS7(out, p7, in, flags))
        goto err;

    ret = 0;

 err:

    if (ret) {
        fprintf(stderr, "Error Encrypting Data\n");
        ERR_print_errors_fp(stderr);
    }

    if (p7)
        PKCS7_free(p7);
    if (rcert)
        X509_free(rcert);
    if (recips)
        sk_X509_pop_free(recips, X509_free);

    BIO_free(in);
    BIO_free(out);
    BIO_free(tbio);

    return ret;

}