Git Product home page Git Product logo

moonshotcode's Introduction

moonshotcode

MoonshotCode

Quick code overview:

common.h RSA *private_key; RSA *public_key; X509 *certificate_chain; int certificate_chain_len;

moonshot_init char *privkeyfile = parse_config_for_privkey_location; char *pkcs7certfile = parse_config_for_pkcs7_location; (common.h)private_key = load_private_key(privkeyfile); (common.h)certificate_chain_len = load_certificates(pkcs7certfile, &certificate_chain)

moonshot_preproxy if ACCESS_REQUEST handle_request(request, ACCESS_REQUEST) else if ACCESS_ACCEPT handle_request(request, ACCESS_ACCEPT)

moonshot_postauth if ACCESS_ACCEPT idp_handle_request(request)

handle_request if ACCESS_REQUEST char *cert_string = get_certificate_as_string(&certificate_chain, certificate_chain_len); char *output; int output_len = pack_mime_cert(cert_string, strlen(cert_string), &output) AVP *vp = new_avp("RADIUS_CERT_MESSAGE", output) add_avp(request, vp) else if ACCESS_ACCEPT foreach avp in idp_to_proxy_attr_request_avps: char *urn = unpack_smime(avp); char *returnstring = get_attributes(urn); char *output; int output_len = pack_smime(returnstring, strlen(returnstring), &output, &public_key); AVP *vp = new_avp("RADIUS_PROXY_ATTRIBUTES", output) add_avp(request, vp)

idp_handle_request foreach avp in client_to_idp_attr_request_avps: char *input_data int input_data_len = mime_unpack_text(vp->data.octets, vp->length, &input_data) ATTR_REQ *attr_request = parse_attr_data(input_data, input_data_len)

moonshotcode's People

Contributors

sebastiaangroot avatar marvinhiemstra avatar koenveelenturf avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.