1 /** @file 2 Licensed to the Apache Software Foundation (ASF) under one 3 or more contributor license agreements. See the NOTICE file 4 distributed with this work for additional information 5 regarding copyright ownership. The ASF licenses this file 6 to you under the Apache License, Version 2.0 (the 7 "License"); you may not use this file except in compliance 8 with the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17 */ 18 19 #pragma once 20 21 /* in the query string that we add to sign the url: */ 22 #define CIP_QSTRING "C" /* C=24.0.33.12 designates the client IP address */ 23 #define EXP_QSTRING "E" /* E=1356128799 means expires at (seconds since Unix epoch) */ 24 #define ALG_QSTRING "A" /* A=1 means hashing algorithm 1 */ 25 #define KIN_QSTRING "K" /* K=3 means use key number 3 */ 26 #define PAR_QSTRING \ 27 "P" /* P=1110 means use parts 0, 1 and 2 (and no more) for the hashing of the url after removing the 'http://' */ 28 /* and making the parts by doing a split("/") */ 29 #define SIG_QSTRING \ 30 "S" /* S=9e2828d570a4bee3c964f698b0985ee58b9f6b64 means 9e2828d570a4bee3c964f698b0985ee58b9f6b64 is the sig \ 31 This one has to be the last one of the string */ 32 33 #define CIP_STRLEN 20 34 #define EXP_STRLEN 16 35 #define PAR_STRLEN 16 36 #define MAX_PARTS 32 37 #define MAX_SEGMENTS 64 38 39 #define MAX_HTTP_REQUEST_SIZE 8192 // 40 41 #define MAX_SIG_SIZE 20 42 #define SHA1_SIG_SIZE 20 43 #define MD5_SIG_SIZE 16 44 45 #define MAX_REQ_LEN 8192 46 #define MAX_KEY_LEN 256 47 #define MAX_KEY_NUM 16 48 #define MAX_QUERY_LEN 4096 49 50 #define USIG_HMAC_SHA1 1 51 #define USIG_HMAC_MD5 2 52