#ifdef CRYPTO
#define HASHLEN 32
-extern int SWFVerify(const char *url, unsigned int *size, unsigned char *hash);
+extern int SWFVerify(const char *url, unsigned int *size, unsigned char *hash, int ask);
#endif
#define RTMPDUMP_VERSION "v2.0"
}
case 'W':
STR2AVAL(swfUrl, optarg);
- if (SWFVerify(optarg, &swfSize, hash) == 0)
+ if (SWFVerify(optarg, &swfSize, hash, 1) == 0)
{
swfHash.av_val = (char *)hash;
swfHash.av_len = HASHLEN;
#ifdef CRYPTO
#define HASHLEN 32
-extern int SWFVerify(const char *url, unsigned int *size, unsigned char *hash);
+extern int SWFVerify(const char *url, unsigned int *size, unsigned char *hash, int ask);
#endif
#define RTMPDUMP_STREAMS_VERSION "v2.0"
unsigned char hash[HASHLEN];
STR2AVAL(req->swfUrl, arg);
- if (SWFVerify(arg, &req->swfSize, hash) == 0)
+ if (SWFVerify(arg, &req->swfSize, hash, 1) == 0)
{
req->swfHash.av_val = malloc(HASHLEN);
req->swfHash.av_len = HASHLEN;
#define HEX2BIN(a) (((a)&0x40)?((a)&0xf)+9:((a)&0xf))
int
-SWFVerify(const char *url, unsigned int *size, unsigned char *hash)
+SWFVerify(const char *url, unsigned int *size, unsigned char *hash, int ask)
{
FILE *f = NULL;
char *path, *home, date[64];
}
}
+ if (got && !ask)
+ return 0;
+
in.first = 1;
in.date = date;
HMAC_CTX_init(&ctx);