pub fn new<P>(auth: String, store_path: P, key_path: P, cert_path: P)
                  -> BerylliumResult<BotService>
        where P: AsRef<Path>
    {
        openssl::init();
        let certs = Self::load_certs(cert_path)?;
        let key = Self::load_private_key(key_path)?;
        // We don't need client auth, because we're checking `Authorization` header.
        let mut tls_config = ServerConfig::new(NoClientAuth::new());
        tls_config.set_single_cert(certs, key);
        utils::set_auth_token(auth);
        utils::set_store_path(store_path);

        Ok(BotService {
            config: tls_config,
        })
    }
/// Initialize the service with the given auth token (obtained from devbot),
/// storage, private key and certificate paths.
///
/// Note that the certificate and the (RSA) private key should be
/// in PEM format.
Initialize the service with the given auth token (obtained from devbot),
storage, private key and certificate paths.

Note that the certificate and the (RSA) private key should be
in PEM format.
Initialize the service with the given auth token ( obtained from devbot ) storage private key and certificate paths . Note that the certificate and the ( RSA ) private key should be in PEM format .
pub fn new<P>(auth: String, store_path: P, key_path: P, cert_path: P)
                  -> BerylliumResult<BotService>
        where P: AsRef<Path>
    {
        openssl::init();
        let certs = Self::load_certs(cert_path)?;
        let key = Self::load_private_key(key_path)?;
        // We don't need client auth, because we're checking `Authorization` header.
        let mut tls_config = ServerConfig::new(NoClientAuth::new());
        tls_config.set_single_cert(certs, key);
        utils::set_auth_token(auth);
        utils::set_store_path(store_path);
        Ok(BotService {
            config: tls_config,
        })
    }
pub fn new < P > ( auth : String , store_path : P , key_path : P , cert_path : P ) -> BerylliumResult < BotService > where P : AsRef < Path > { openssl :: init ( ) ; let certs = Self :: load_certs ( cert_path ) ? ; let key = Self :: load_private_key ( key_path ) ? ; // We don't need client auth, because we're checking `Authorization` header. let mut tls_config = ServerConfig :: new ( NoClientAuth :: new ( ) ) ; tls_config . set_single_cert ( certs , key ) ; utils :: set_auth_token ( auth ) ; utils :: set_store_path ( store_path ) ; Ok ( BotService { config : tls_config , } ) }
Initialize the service with the given auth token (obtained from devbot),
storage, private key and certificate paths.
Initialize the service with the given auth token ( obtained from devbot ) storage private key and certificate paths .
auth
String
store_path
P
key_path
P
cert_path
P