Changeset 63
- Timestamp:
- 02/22/12 00:32:32 (9 years ago)
- Location:
- middleware-offline/trunk/_src
- Files:
-
- 4 added
- 8 modified
Legend:
- Unmodified
- Added
- Removed
-
middleware-offline/trunk/_src/eidmw/eidgui/AutoUpdates.cpp
r59 r63 347 347 348 348 #ifdef WIN32 349 if (arch == " x86_64")349 if (arch == "i386") 350 350 { 351 351 pkgname.append("PteidMW35-Basic-en.msi"); -
middleware-offline/trunk/_src/eidmw/eidgui/dlgsignature.cpp
r41 r63 57 57 this->resize(thiswidth,height-20); //make sure the window fits 58 58 } 59 60 /* QVBoxLayout *layout = new QVBoxLayout; 61 this->setLayout(layout); 62 63 this->layout()->setSizeConstraint(QLayout::SetFixedSize); 64 this->setSizeGripEnabled(false); */ 59 65 60 66 } … … 127 133 QMenu *myMenu = new QMenu(ui.listView); 128 134 //myMenu->addAction("Remove Item"); 129 QAction *_ open= new QAction("Remove", this);130 myMenu->addAction(_ open);131 connect( _ open, SIGNAL( triggered() ), this, SLOT( RemoveFromView() ) );135 QAction *_remove = new QAction("Remove", this); 136 myMenu->addAction(_remove); 137 connect( _remove, SIGNAL( triggered() ), this, SLOT( RemoveFromView() ) ); 132 138 QAction* selectedItem = myMenu->exec(globalPos); 133 134 139 135 140 /*if (selectedItem) … … 197 202 connect(&this->FutureWatcher, SIGNAL(finished()), pdialog, SLOT(cancel())); 198 203 199 int outp_len = native_path.size(); 204 //Get the Xades-T checkbox value 205 QCheckBox *xades_t = ui.checkBox; 206 bool is_xades_t = xades_t->checkState() == Qt::Checked; 200 207 201 208 … … 205 212 strcpy(output_file,(char*)native_path.toStdString().c_str()); 206 213 #else 214 int outp_len = native_path.size(); 207 215 output_file = new char[outp_len*2]; 208 216 strncpy(output_file, native_path.toUtf8().constData(), outp_len*2); 209 217 #endif 210 218 PTEID_LOG(PTEID_LOG_LEVEL_DEBUG, "eidgui", "Save to file %s", output_file); 211 QFuture<void> future = QtConcurrent::run(this, &dlgSignature::runsign, files_to_sign, i, output_file );219 QFuture<void> future = QtConcurrent::run(this, &dlgSignature::runsign, files_to_sign, i, output_file, is_xades_t); 212 220 this->FutureWatcher.setFuture(future); 213 221 … … 227 235 } 228 236 229 void dlgSignature::runsign(const char ** paths, unsigned int n_paths, const char *output_path) 230 { 231 unsigned long ReaderStartIdx = 1; 232 bool bRefresh = false; 233 //unsigned long ReaderEndIdx = ReaderSet.readerCount(bRefresh); 234 unsigned long ReaderIdx = 0; 237 void dlgSignature::runsign(const char ** paths, unsigned int n_paths, const char *output_path, bool timestamp) 238 { 235 239 236 240 try … … 238 242 PTEID_EIDCard* Card = dynamic_cast<PTEID_EIDCard*>(m_CI_Data.m_pCard); 239 243 PTEID_ByteArray SignXades; 240 SignXades = Card->SignXadesT(paths, n_paths, output_path); 244 if (timestamp) 245 SignXades = Card->SignXadesT(paths, n_paths, output_path); 246 else 247 SignXades = Card->SignXades(paths, n_paths, output_path); 241 248 242 249 } … … 247 254 } 248 255 249 //pdialog->close();250 251 256 return; 252 257 } -
middleware-offline/trunk/_src/eidmw/eidgui/dlgsignature.h
r35 r63 53 53 54 54 void SignListView (QStringList list); 55 void runsign(const char ** paths, unsigned int n_paths, const char *output_path );55 void runsign(const char ** paths, unsigned int n_paths, const char *output_path, bool timestamp); 56 56 57 57 }; -
middleware-offline/trunk/_src/eidmw/eidlib/eidlib.h
r59 r63 776 776 public: 777 777 PTEIDSDK_API static bool VerifySignature(const char *container, char * error_buffer, unsigned long *error_size); 778 PTEIDSDK_API static bool VerifySignature(const char *container, char * error_buffer, unsigned long &error_size); 778 779 779 780 }; -
middleware-offline/trunk/_src/eidmw/eidlib/eidlib.i
r59 r63 530 530 531 531 %typemap(javain) const unsigned char* "$javainput" 532 533 %ignore eIDMW::PTEID_SigVerifier::VerifySignature(const char *container, char * error_buffer, unsigned long *error_size); 534 535 %typemap(javaout) bool eIDMW::PTEID_SigVerifier::VerifySignature(const char *container, char * error_buffer, unsigned long &error_size) 536 { 537 538 long error_size_internal = pteidlibJava_WrapperJNI.new_ulongp(); 539 boolean retval = pteidlibJava_WrapperJNI.PTEID_SigVerifier_VerifySignature(container, error_buffer, error_size_internal); 540 541 error_size.m_long = pteidlibJava_WrapperJNI.ulongp_value(error_size_internal); 542 pteidlibJava_WrapperJNI.delete_ulongp(error_size_internal); 543 return retval; 544 } 545 546 %typemap(in) const char * const * (jint size) { 547 548 int i = 0; 549 size = jenv->GetArrayLength($input); 550 $1 = (char **) malloc((size+1)*sizeof(char *)); 551 /* make a copy of each string */ 552 for (i = 0; i<size; i++) { 553 jstring j_string = (jstring)jenv->GetObjectArrayElement($input, i); 554 const char * c_string = jenv->GetStringUTFChars( j_string, 0); 555 $1[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char)); 556 strcpy($1[i], c_string); 557 jenv->ReleaseStringUTFChars(j_string, c_string); 558 jenv->DeleteLocalRef(j_string); 559 } 560 $1[i] = 0; 561 562 } 532 563 533 564 //------------------------------------------------ -
middleware-offline/trunk/_src/eidmw/eidlib/eidlibxades.cpp
r59 r63 33 33 } 34 34 35 bool PTEID_SigVerifier::VerifySignature(const char *container_path, char * error_buffer, unsigned long &error_size) 36 { 37 bool res = false; 38 39 res = APLVerifySignature(container_path, error_buffer, &error_size); 40 return res; 41 42 } 35 43 36 44 PTEID_ByteArray PTEID_EIDCard::SignXades(const char * const* paths, unsigned int n_paths, const char *output_path) -
middleware-offline/trunk/_src/eidmw/eidlibJava_Wrapper/create_java_files.sh
r5 r63 1 swig -c++ -java -package be.portugal.eid-o ./GeneratedFiles/eidlibJava_Wrapper.cpp -outdir ./GeneratedFiles ../eidlib/eidlib.i1 swig -c++ -java -package pt.gov.cartaodecidadao -o ./GeneratedFiles/eidlibJava_Wrapper.cpp -outdir ./GeneratedFiles ../eidlib/eidlib.i -
middleware-offline/trunk/_src/eidmw/mdw_online_patches/apply_patches.sh
r41 r63 2 2 3 3 #patch -p0 -i build_on_glibc_2.14.patch 4 #patch -p0 -i dont_ask_for_pin_on_sign.patch4 patch -p0 -i dont_ask_for_pin_on_sign.patch 5 5 patch -p0 -i use_rpath_origin.patch